1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-01-17 21:38:16 +01:00

getStatusCode returns string, not integer.

This commit is contained in:
Gajus Kuizinas 2014-08-26 19:53:06 +03:00
parent 47ca212e98
commit 30ac0ba914

View File

@ -11,7 +11,7 @@ $client = new GuzzleHttp\Client();
$response = $client->get('http://guzzlephp.org');
$res = $client->get('https://api.github.com/user', ['auth' => ['user', 'pass']]);
echo $res->getStatusCode();
// 200
// "200"
echo $res->getHeader('content-type');
// 'application/json; charset=utf8'
echo $res->getBody();