CURL To Post Application/json
We tried to use the CURL fn to POST json, but it’s sent as form data and there seems no support for changing the Content-Type header. We switched to invoking curl in the shell.
All the documentation I could find says there is just one parameter for the url and an optional second for POST body. Is there an undocumented way to set Content-Type?
3 thoughts on - CURL To Post Application/json
Hi David,
Have you tried CURLOPT function. i.e Set(CURLOPT(header)=Content-Type: application/json)
Regards
Nasir Iqbal
ICTBroadcast – an Auto Dialer software for ITSP
<https://www.ictbroadcast.com/how-become-internet-telephony-service-provider-itsp-using-ictbroadcast-sp-edition>
SMS, Fax and Voice broadcasting & Inbound / Outbound Campaigns http://www.ictbroadcast.com/
My mistake, CURLOPT(header) is only to retrieve headers, not to sent. sorry.
Nasir Iqbal
ICTBroadcast – an Auto Dialer software for ITSP
<https://www.ictbroadcast.com/how-become-internet-telephony-service-provider-itsp-using-ictbroadcast-sp-edition>
SMS, Fax and Voice broadcasting & Inbound / Outbound Campaigns http://www.ictbroadcast.com/
Thanks, Nasir, I’ll see if that allows us to avoid SHELL.