Ask a Question
Advertise on boostr.in
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);
Sep 7, 2015
to add a comment.
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please