thiswayup
thiswayup

Reputation: 2077

How do I get the last request headers using 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?

Upvotes: 0

Views: 2462

Answers (1)

Patrick at CloudBudgie
Patrick at CloudBudgie

Reputation: 785

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

Upvotes: 2

Related Questions