[Freeswitch-users] cURL response code from API

Aleksandr Chusov chusov.alexsandr at gmail.com
Fri Apr 17 07:45:55 MSD 2015


2015-04-17 4:21 GMT+03:00 Oleg Stolyar <olegstolyar at gmail.com>:

>
> resp = api:execute("curl", some_url)
>
> where can I get the curl response code?
>


I use json

   local response = api:execute("curl", url .. " json timeout 2 get ")
   resp = json.decode(response)

   if  resp.status_code ~= 200 then
   ....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150417/9e73d7a3/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list