Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


using php curl how does one get the response body for a 400 response using -'php,curl'


using php curl how does one get the response body for a 400 response  using -'php,curl'

The api I'm calling returns a json object of validation errors with the HTTP code 400. I implemented the client using PHP's curl library, but on error curl_exec returns false. How can I get the response body on error?

Note that I am setting curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    

asked Sep 7, 2015 by rajesh
0 votes
6 views



Related Hot Questions



Government Jobs Opening


...