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