[OpenSIPS-Users] !rest_get behavior
Liviu Chircu
liviu at opensips.org
Wed Jul 26 02:50:17 EDT 2017
Hi Tito,
It seems that originally, the rest_xxx() functions could return either
"false" or "true", depending if the used libcurl was patched or not.
This commit [1] fixed the problem, but the doc examples were not
updated. I'll have it fixed.
[1]: https://github.com/OpenSIPS/opensips/commit/1363a620
Best regards,
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 25.07.2017 21:18, Tito Cumpen wrote:
>
> Group
>
> I am using the latest opensips 2.3 and I am wondering why a 404
> response doesn't invoke this block ?
>
>
> if (!rest_get("http://$avp(api)/cc/authorized/$fU/$rU",
> "$json(authresponse)", "$var(ct)", "$var(rcode)")) {
>
> xlog("Error code $var(rcode) in HTTP GET!\n");
>
>
> xlog("on account of admittance error we are sending the call to the AS
> server for processing");
>
> route(ASroute);
>
> }
>
>
>
> the far end response looks like this.
>
>
> HTTP/1.1 404 Not Found.
>
> X-Powered-By: Express.
>
> Vary: Origin, Accept-Encoding.
>
> Access-Control-Allow-Credentials: true.
>
> Content-Type: text/plain; charset=utf-8.
>
> Content-Length: 9.
>
> ETag: W/"9-nR6tc+Z4+i9RpwqTOwvwFw".
>
> Date: Tue, 25 Jul 2017 18:11:39 GMT.
>
> Connection: keep-alive.
>
> .
>
> Not Found
>
> from the example it looks like other 4XX responses are considered.
>
>
> Thanks,
> Tito
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170726/693fd7ba/attachment.html>
More information about the Users
mailing list