protected function fetchProviderData($url, array $headers = [])
    {
        $client = $this->getProvider()->getHttpClient();
        $client->setBaseUrl($url);

        if ($headers)
        {
            $client->setDefaultOption('headers', $headers);
        }

        $request = $client->get()->send();
        $response = $request->getBody();

        return $response;
    }
protected function fetchProviderData($url, array $headers = [])
    {
        $client = $this->getProvider()->getHttpClient();
        $client->setBaseUrl($url);

        if ($headers)
        {
            $client->setDefaultOption('headers', $headers);
        }

        $request = $client->get()->send();
        $response = $request->getBody();

        return $response;
    }
protected function fetchProviderData ( $ url , array $ headers = [ ] ) { $ client = $ this -> getProvider ( ) -> getHttpClient ( ) ; $ client -> setBaseUrl ( $ url ) ; if ( $ headers ) { $ client -> setDefaultOption ( 'headers' , $ headers ) ; } $ request = $ client -> get ( ) -> send ( ) ; $ response = $ request -> getBody ( ) ; return $ response ; }
Fetch provider data

@param       $url
@param array $headers

@return mixed
Fetch provider data