Closed (fixed)
Project:
Http Client
Version:
7.x-2.1
Component:
Code
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Jul 2011 at 10:33 UTC
Updated:
23 Jul 2011 at 07:50 UTC
I am using the execute() method of HttpClient class to execute the HttpClientRequest and it works just fine.
But, I need the response code and response headers as they are required at times while working with the Google Data Protocol, especially with Documents List API.
How can I send a request using this module and get response code, response header and of course, response body at the same time?
Comments
Comment #1
voxpelli commentedThe response code should be possible to find in the response object as "responseCode", the response message as "responseMessage", the headers as "headers" and the body as "body".
So doing a $client->get() should return an object with those properties so that you can check eg. $obj->responseCode to get the responseCode.
Comment #2
vaidik commentedSo with the help provided by voxpelli, I am doing this to achieve what I wanted to:
Thanks a lot for the help.