public static function getHttpClient($token, $client = null)
    {
        if ($client == null) {
            $client = new Zend_Gdata_HttpClient();
        }
        if (!$client instanceof Zend_Gdata_HttpClient) {
            require_once 'Zend/Gdata/App/HttpException.php';
            throw new Zend_Gdata_App_HttpException('Client is not an instance of Zend_Gdata_HttpClient.');
        }
        $useragent = 'Zend_Framework_Gdata/' . Zend_Version::VERSION;
        $client->setConfig(array(
                'strictredirects' => true,
                'useragent' => $useragent
            )
        );
        $client->setAuthSubToken($token);
        return $client;
    }
public static function getHttpClient($token, $client = null)
    {
        if ($client == null) {
            $client = new Zend_Gdata_HttpClient();
        }
        if (!$client instanceof Zend_Gdata_HttpClient) {
            require_once 'Zend/Gdata/App/HttpException.php';
            throw new Zend_Gdata_App_HttpException('Client is not an instance of Zend_Gdata_HttpClient.');
        }
        $useragent = 'Zend_Framework_Gdata/' . Zend_Version::VERSION;
        $client->setConfig(array(
                'strictredirects' => true,
                'useragent' => $useragent
            )
        );
        $client->setAuthSubToken($token);
        return $client;
    }
public static function getHttpClient ( $ token , $ client = null ) { if ( $ client == null ) { $ client = new Zend_Gdata_HttpClient ( ) ; } if ( ! $ client instanceof Zend_Gdata_HttpClient ) { require_once 'Zend/Gdata/App/HttpException.php' ; throw new Zend_Gdata_App_HttpException ( 'Client is not an instance of Zend_Gdata_HttpClient.' ) ; } $ useragent = 'Zend_Framework_Gdata/' . Zend_Version :: VERSION ; $ client -> setConfig ( array ( 'strictredirects' => true , 'useragent' => $ useragent ) ) ; $ client -> setAuthSubToken ( $ token ) ; return $ client ; }
Retrieve a HTTP client object with AuthSub credentials attached
as the Authorization header

@param string $token The token to retrieve information about
@param Zend_Gdata_HttpClient $client (optional) HTTP client to use to make the request
Retrieve a HTTP client object with AuthSub credentials attached as the Authorization header