[OpenSIPS-Users] CURL library with respect to REST_API calls

Liviu Chircu liviu at opensips.org
Thu Jul 7 10:52:52 CEST 2016


Although the official documentation specifically states that the default 
libcurl behavior is to return the body even on an error response [1], 
have you tried to explicitly set the CURLOLPT_FAILONERROR option to 0?

[1]: https://curl.haxx.se/libcurl/c/CURLOPT_FAILONERROR.html

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 06.07.2016 22:13, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

On the below topic, I have double checked that call back function is not 
at called in the case of failure response. This is confirmed by adding 
some debug statements in write_func(). I have not made any changes with 
respect to functionality.Only in success case I could able to see the 
call back called.

I could also confirm by seeing the Wireshark traces am getting response 
body in the case of failure as well. In our case since call back 
function is not called, hence no response body is returned. Can you 
please check in your end whether call back is called in the case when 
curl_easy_perform fails.

Regards,
Agalya

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160707/40046f18/attachment.htm>


More information about the Users mailing list