private function getHTTPClient()
    {
        $config = [
            'base_uri' => sprintf(
                'http://%s.%s/',
                $this->subdomain,
                $this->domain
            ),
            'headers' => [
                'Accept' => 'application/json',
                'User-Agent' => sprintf('Montage PHP v%d', $this->version),
                'X-Requested-With' => 'XMLHttpRequest'
            ]
        ];

        //Set the token if it exists
        if ($this->token)
        {
           $config['headers']['Authorization'] = sprintf('Token %s', $this->token);
        }

        if ($this->debug)
        {
            $config['debug'] = true;
        }

        return new Client($config);
    }
private function getHTTPClient()
    {
        $config = [
            'base_uri' => sprintf(
                'http://%s.%s/',
                $this->subdomain,
                $this->domain
            ),
            'headers' => [
                'Accept' => 'application/json',
                'User-Agent' => sprintf('Montage PHP v%d', $this->version),
                'X-Requested-With' => 'XMLHttpRequest'
            ]
        ];

        //Set the token if it exists
        if ($this->token)
        {
           $config['headers']['Authorization'] = sprintf('Token %s', $this->token);
        }

        if ($this->debug)
        {
            $config['debug'] = true;
        }

        return new Client($config);
    }
private function getHTTPClient ( ) { $ config = [ 'base_uri' => sprintf ( 'http://%s.%s/' , $ this -> subdomain , $ this -> domain ) , 'headers' => [ 'Accept' => 'application/json' , 'User-Agent' => sprintf ( 'Montage PHP v%d' , $ this -> version ) , 'X-Requested-With' => 'XMLHttpRequest' ] ] ; //Set the token if it exists if ( $ this -> token ) { $ config [ 'headers' ] [ 'Authorization' ] = sprintf ( 'Token %s' , $ this -> token ) ; } if ( $ this -> debug ) { $ config [ 'debug' ] = true ; } return new Client ( $ config ) ; }
Does what it says.  Gets a guzzle client, with an Authorization header
set in case of an existing token.

@return Client
Does what it says . Gets a guzzle client with an Authorization header set in case of an existing token .