private static function createClient(array $options)
    {
        $verify = true;
        //Disable SSL if proxy has been set, and set the proxy in the client.
        $proxy = getenv('HTTP_PROXY');
        // For testing with Fiddler
        // $proxy = 'localhost:8888';
        // $verify = false;
        if (!empty($proxy)) {
            $options['proxy'] = $proxy;
        }

        if (!empty($options['verify'])) {
            $verify = $options['verify'];
        }

        return (new \GuzzleHttp\Client(
            array_merge(
                $options,
                array(
                    "defaults" => array(
                        "allow_redirects" => true,
                        "exceptions" => true,
                        "decode_content" => true,
                    ),
                    'cookies' => true,
                    'verify' => $verify,
                )
            )
        ));
    }
private static function createClient(array $options)
    {
        $verify = true;
        //Disable SSL if proxy has been set, and set the proxy in the client.
        $proxy = getenv('HTTP_PROXY');
        // For testing with Fiddler
        // $proxy = 'localhost:8888';
        // $verify = false;
        if (!empty($proxy)) {
            $options['proxy'] = $proxy;
        }

        if (!empty($options['verify'])) {
            $verify = $options['verify'];
        }

        return (new \GuzzleHttp\Client(
            array_merge(
                $options,
                array(
                    "defaults" => array(
                        "allow_redirects" => true,
                        "exceptions" => true,
                        "decode_content" => true,
                    ),
                    'cookies' => true,
                    'verify' => $verify,
                )
            )
        ));
    }
private static function createClient ( array $ options ) { $ verify = true ; //Disable SSL if proxy has been set, and set the proxy in the client. $ proxy = getenv ( 'HTTP_PROXY' ) ; // For testing with Fiddler // $proxy = 'localhost:8888'; // $verify = false; if ( ! empty ( $ proxy ) ) { $ options [ 'proxy' ] = $ proxy ; } if ( ! empty ( $ options [ 'verify' ] ) ) { $ verify = $ options [ 'verify' ] ; } return ( new \ GuzzleHttp \ Client ( array_merge ( $ options , array ( "defaults" => array ( "allow_redirects" => true , "exceptions" => true , "decode_content" => true , ) , 'cookies' => true , 'verify' => $ verify , ) ) ) ) ; }
Create a Guzzle client for future usage.

@param  array $options Optional parameters for the client.

@return Client
Create a Guzzle client for future usage .