Using the Zend Framework Http client, how do I get the http response/server code from each request? I am getting the body just fine, but the response code would be nice too.
Asked
Active
Viewed 1,944 times
1
-
Found the answer: $response->getStatus(); – Tom Apr 11 '11 at 23:06
-
3You should add that as an answer and mark it as accepted – Phil Apr 12 '11 at 02:18
1 Answers
8
Found the answer:
$response->getStatus();

OMG Ponies
- 325,700
- 82
- 523
- 502

Tom
- 91
- 6
-
or `$response->getCode()` to get sth. like (int) 404, am I right? – Tomáš Fejfar May 24 '11 at 00:49