Hi,More info on the problem:[DEBUG] mod_curl.c:166 method: post, url: http://<private IP>:8080/PushServer/api/push, content-type: (null)
So for some reason mod_curl is not setting the Content-Type header at all, which is what I think is causing my web server to complain.Thanks.JeffOn Wed, May 28, 2014 at 4:49 PM, Jeff Stark <jstark888@gmail.com> wrote:Hi,Is there a way to set the Content-Type header when using mod_curl in a Lua script?Using curl on the command line I can do the following:curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"field1":"val1","field2":"val2"}' http://mydomain.com/And in a Lua script I can do the following:local my_json = "{\"field1\":\"val1\",\"field2\":\"val2\"}"api = freeswitch.API()response_data = api:execute("curl", "http://mydomain.com/ post" .. my_json)But I don't see a way in the freeswitch API to set the Content-Type header in the above script.Appreciate any help or insight that can be offered.Thanks.Jeff
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.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