[Freeswitch-users] cURL response code from API
Oleg Stolyar
olegstolyar at gmail.com
Sat Apr 18 02:33:10 MSD 2015
Thanks Aleksandr! I was hoping to avoid having to parse the headers/json
but I guess I'll have to.
On Thu, Apr 16, 2015 at 8:45 PM, Aleksandr Chusov <
chusov.alexsandr at gmail.com> wrote:
>
> 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
> ....
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150417/2171feb6/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list