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@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@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@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