protected function getUrl($url, $headers, $timeout): ResponseInterface
    {
        try {
            $options = $this->buildGuzzleOptions($headers, $timeout);
            $response = $this->requestFactory->request($url, 'GET', $options);
        } catch (ClientException $e) {
            $response = $e->getResponse();
        } catch (ServerException $e) {
            $response = $e->getResponse();
        }

        return $response;
    }
protected function getUrl($url, $headers, $timeout): ResponseInterface
    {
        try {
            $options = $this->buildGuzzleOptions($headers, $timeout);
            $response = $this->requestFactory->request($url, 'GET', $options);
        } catch (ClientException $e) {
            $response = $e->getResponse();
        } catch (ServerException $e) {
            $response = $e->getResponse();
        }

        return $response;
    }
protected function getUrl ( $ url , $ headers , $ timeout ) : ResponseInterface { try { $ options = $ this -> buildGuzzleOptions ( $ headers , $ timeout ) ; $ response = $ this -> requestFactory -> request ( $ url , 'GET' , $ options ) ; } catch ( ClientException $ e ) { $ response = $ e -> getResponse ( ) ; } catch ( ServerException $ e ) { $ response = $ e -> getResponse ( ) ; } return $ response ; }
Fetches a page by sending the configured headers.

@param string $url
@param string[] $headers
@param float $timeout
@return ResponseInterface
@throws \Exception
Fetches a page by sending the configured headers .