doujuanju3076 2011-10-26 17:16 采纳率: 0%
浏览 54
已采纳

如何使用Zend_Http_Client获取最后一个请求标头?

I am trying to use a rest api to upload a file. I;m not sure if its my code or if its the api. I am using Zend_Http_Client to upload the file.

The code I'm using I think is correct:

$tokenRequest = new Zend_Oauth_Token_
$tokenRequest = new Zend_Oauth_Token_Access();
$tokenRequest->setTokenSecret($secret);
$tokenRequest->setToken($access);
$client = $tokenRequest->getHttpClient($config);
$client->setUri($requestUrl);
$client->setMethod(Zend_Http_Client::POST);
$client->setFileUpload('C://Users//user1//Desktop//test.csv', 'bufile');
$response = $client->request('POST');

How do I get the last sent request headers?

  • 写回答

1条回答 默认 最新

  • dongliangkeng1056 2011-10-26 17:40
    关注

    Is this what your looking for: Zend_Http_Client->getLastRequest()

    http://framework.zend.com/manual/en/zend.http.client.html#zend.http.client.accessing_last

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?