[Freeswitch-users] Passing credentials when invoking "curl"

JP jaykris at gmail.com
Fri Jan 25 00:45:00 MSK 2013


Thanks Gilbert. That worked for me.
-JP

On Thu, Jan 24, 2013 at 12:04 PM, Gilbert Amar <gamar at center.com> wrote:

> Hi ****
>
> If it is a basic authentication, you can try ****
>
> http://userid:password@mywebservice.com:8080/status/agent/test****
>
> ** **
>
> not sure it works try first a direct from command line :****
>
> ** **
>
> curl "http://userid:password@mywebservice.com:8080/status/agent/test" ****
>
> ** **
>
> Gilbert****
>
> ** **
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *JP
> *Sent:* Thursday, January 24, 2013 11:50 AM
> *To:* FreeSWITCH Users Help
> *Subject:* [Freeswitch-users] Passing credentials when invoking "curl"****
>
> ** **
>
> I am trying to use curl from a lua script to get data from a webservice
> and need to pass user/password information. Can someone help me with this?
> Here is what I am doing, which does not seem to work.****
>
> ** **
>
> api = freeswitch.API()****
>
> agent_status_url = "-u userid:password
> http://mywebservice.com:8080/status/agent/test"****
>
> response = api:execute("curl", agent_status_url)****
>
> freeswitch.consoleLog("INFO", response)****
>
> ** **
>
> Thanks****
>
> ** **
>
> _________________________________________________________________________
> 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/20130124/d216fd92/attachment.html 


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