src/Google/AdsApi/Common/AdsGuzzleHttpClientFactory.php
public function generateHttpClient()
    {
        $config = $this->config;
        if (!array_key_exists('handler', $config)
            || $config['handler'] === null) {
            $config['handler'] = HandlerStack::create();
        }

        // Add a logging middleware required by this library.
        $config['handler']->before(
            'http_errors',
            GuzzleLogMessageHandler::log($this->logger, $this->messageFormatter)
        );

        return new Client($config);
    }
public function generateHttpClient()
    {
        $config = $this->config;
        if (!array_key_exists('handler', $config)
            || $config['handler'] === null) {
            $config['handler'] = HandlerStack::create();
        }

        // Add a logging middleware required by this library.
        $config['handler']->before(
            'http_errors',
            GuzzleLogMessageHandler::log($this->logger, $this->messageFormatter)
        );

        return new Client($config);
    }
public function generateHttpClient ( ) { $ config = $ this -> config ; if ( ! array_key_exists ( 'handler' , $ config ) || $ config [ 'handler' ] === null ) { $ config [ 'handler' ] = HandlerStack :: create ( ) ; } // Add a logging middleware required by this library. $ config [ 'handler' ] -> before ( 'http_errors' , GuzzleLogMessageHandler :: log ( $ this -> logger , $ this -> messageFormatter ) ) ; return new Client ( $ config ) ; }
Generates a Guzzle HTTP client for making HTTP calls by using configs of
the user-provided client. This method adds the logging middleware required
by this library to the handler stack of the generated client.

@return Client the Guzzle HTTP client
Generates a Guzzle HTTP client for making HTTP calls by using configs of the user - provided client . This method adds the logging middleware required by this library to the handler stack of the generated client .