[Freeswitch-users] CURL headers

Steven Schoch schoch+freeswitch.org at xwin32.com
Tue Mar 28 20:11:02 MSD 2017


I've been using headers in the api curl command for over a year. My lua
code looks like this:
-- url is in the form https://user:password@host/path
-- data is a JSON string in the form { "name":"value", "name2":"value2" }
api:execute("curl", url .. " content-type application/json post '" .. data
.. "'")

Which brings up a problem I'm having. Some time ago when I upgraded
FreeSWITCH, the user:password fields either started getting corrupted or
ignored, because I'm now getting a 401 error. I'm going to look through the
curl code to see if I can find where this is happening.

-- 
Steve

On Tue, Mar 28, 2017 at 8:29 AM, Michael Jerris <mike at jerris.com> wrote:

> in master it just got added to the api command, i don’t think its in the
> js object.
>
> On Mar 28, 2017, at 6:43 AM, Matt Broad <matt at supportedbusiness.com>
> wrote:
>
> Hi,
>
> is it possible to add a header when using  the javascript function
> curl.run?
> I need to add a custom header.
>
> Below is an example of the script I currently use
>
> var curl = new CURL();
> curl.run("GET", "http://www.url.com", "details=value", curl_callback,
> "myarg");
>
>
>
> _________________________________________________________________________
> 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/20170328/3da025c4/attachment.html 


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