I'm using Guzzle in Laravel 4 to return some data from another server, but I can't handle Error 400 bad request
[status code] 400 [reason phrase] Bad Request
using:
$client->get('http://www.example.com/path/'.$path,
[
'allow_redirects' => true,
'timeout' => 2000
]);
how to solve it? thanks,
Use http_errors => false option with the request.
As written in Guzzle official documentation: http://guzzle.readthedocs.org/en/latest/quickstart.html
For correct error handling I would use this code: