public function prepareCall( Client $client = null ) {
        // Set the default client:
        $this->curlClient = null;
        $client           = null;

        $this->log( 'prepare ' . __CLASS__ . ' GuzzleRequest: base_uri(' . $this->getBaseUri() . '), client(' . ( (bool) is_null( $client ) ) . '), timeout(' . $this->getCurlTimeout() . '), ', 'debug');

        // Check if baseUri is set or that $client is set (make pass trough client available else set the client self)
        if ( $this->getBaseUri() !== null && $client === null ) {
            // Initialize the Client:
            $this->curlClient = new Client( [
                // Base URI is used with relative requests
                'base_uri' => $this->getBaseUri(),

                // You can set any number of default request options.
                'timeout'  => 2.0,
            ] );
        } else if ( $client !== null ) {
            $this->curlClient = $client;
        }
    }
public function prepareCall( Client $client = null ) {
        // Set the default client:
        $this->curlClient = null;
        $client           = null;

        $this->log( 'prepare ' . __CLASS__ . ' GuzzleRequest: base_uri(' . $this->getBaseUri() . '), client(' . ( (bool) is_null( $client ) ) . '), timeout(' . $this->getCurlTimeout() . '), ', 'debug');

        // Check if baseUri is set or that $client is set (make pass trough client available else set the client self)
        if ( $this->getBaseUri() !== null && $client === null ) {
            // Initialize the Client:
            $this->curlClient = new Client( [
                // Base URI is used with relative requests
                'base_uri' => $this->getBaseUri(),

                // You can set any number of default request options.
                'timeout'  => 2.0,
            ] );
        } else if ( $client !== null ) {
            $this->curlClient = $client;
        }
    }
public function prepareCall ( Client $ client = null ) { // Set the default client: $ this -> curlClient = null ; $ client = null ; $ this -> log ( 'prepare ' . __CLASS__ . ' GuzzleRequest: base_uri(' . $ this -> getBaseUri ( ) . '), client(' . ( ( bool ) is_null ( $ client ) ) . '), timeout(' . $ this -> getCurlTimeout ( ) . '), ' , 'debug' ) ; // Check if baseUri is set or that $client is set (make pass trough client available else set the client self) if ( $ this -> getBaseUri ( ) !== null && $ client === null ) { // Initialize the Client: $ this -> curlClient = new Client ( [ // Base URI is used with relative requests 'base_uri' => $ this -> getBaseUri ( ) , // You can set any number of default request options. 'timeout' => 2.0 , ] ) ; } else if ( $ client !== null ) { $ this -> curlClient = $ client ; } }
Prepare the Guzzle Client

@param Client|null $client
Prepare the Guzzle Client