Forums

HTTP POST request

alex305v 13 Nov, 2016
I am working on a new form i need help with HTTP POST request. The company we work with instructs me to:

In order to create a certification, you send an HTTP POST request to http://ptd.vatsim.net/certifications with the JSON details of the new certification and with your ATO API key (sent as a HEADER along with the request).

Example: curl -X POST -H "Content-Type: application/json" -d '{"cid": "1175035","instructor":"1111111", "rating":"2"}' http://ptd.vatsim.net/certifications -H 'Authorization: Token token="your-ato-api-key"'


How can i make the form submit that request and not affect any other things like data save, email etc...
GreyHead 13 Nov, 2016
Hi alex305v,

ChronoForms has a cURL action that you can use to send data to a remote site like this but I'm not sure that it supports sending an authorisation header. If not, then you can add the cURL PHP into a Custom Code action in the form ON Submit event.

Bob
This topic is locked and no more replies can be posted.