Hi all,I am trying to use mod_curl. According to the docs basic authentication is done like this:
local auth_url = "http://username : password@mysecure_web_service.com"
local response = api:execute("curl", auth_url)
However, I do not want to send credentials in the URL. I am trying to use it like this from LUA:
local api = freeswitch.API()
local response = api:execute('curl', 'https://mydomain.com/api/v1/info --netrc-file mycredentials.txt --insecure --request GET')
The curl statement works just fine when I run it from the same box's comand line
But I keep getting an authentication error.
Can anyone please give me a hint on what the correct format is?
PD: it does not have to be curl. If you can suggest another method to do the same I would be more than happy to know about it.
Thanks!
local auth_url = "http://username : password@mysecure_web_service.com"
local response = api:execute("curl", auth_url)
However, I do not want to send credentials in the URL. I am trying to use it like this from LUA:
local api = freeswitch.API()
local response = api:execute('curl', 'https://mydomain.com/api/v1/info --netrc-file mycredentials.txt --insecure --request GET')
The curl statement works just fine when I run it from the same box's comand line
But I keep getting an authentication error.
Can anyone please give me a hint on what the correct format is?
PD: it does not have to be curl. If you can suggest another method to do the same I would be more than happy to know about it.
Thanks!
Last edited: