cURL response code from API
Hello, if I use in Lua resp = api:execute("curl", some_url) where can I get the curl response code? If I use session:execute("curl", some_url), the code will be in the curl_response_code session variable, but where can I get it if I use api:execute?
2015-04-17 4:21 GMT+03:00 Oleg Stolyar <olegstolyar@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 ....
Hey everybody, is it possible to cancel a „streamFile()“ when the other side makes some noises? And if yes, how can i detect that my stream was successfully played or canceled? I want to do this in Python (or lua, ESL) Hope somebody will help, best Beezerk
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@gmail.com> wrote:
2015-04-17 4:21 GMT+03:00 Oleg Stolyar <olegstolyar@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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Aleksandr Chusov
-
Bemigho Eyimofe
-
Oleg Stolyar