[Freeswitch-users] Get HTTP response to LUA variable

Carlos Cesario ccesario at tecnomega.com.br
Thu Feb 23 16:14:55 MSK 2012


Maybe this can help you..

http://wiki.freeswitch.org/wiki/Mod_http#Lua_Usage

;)

Carlos

Em 23-02-2012 10:31, Sanath Prasanna escreveu:
> Hi all,
> I use url to get charging status as follow in lua app module.
>
> local http = require("socket.http")
> body,c,l,h = http.request{ url =
> "http://localhost/charging.php?mobile=868992222"};
> logInfo("charging http_url body:" .. body .. " ");
> logInfo("charging http_url c:" .. c .. " ");
> logInfo("charging http_url l:" .. encode(l) .. " ");
> logInfo("charging http_url h:" .. h .. " ");
>
> URL will be return 1 or 0 as response. How to get that value in lua
> program. I print body,c,l,h values. But return value is not there.
> Pls help.
> Br,
> Sanath
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.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/20120223/db6f2171/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list