Platform.Function.HTTPPost()

Posts content to the specified URL. This function only works with HTTP on port 80 and HTTPS on port 443. Non-standard port assignments cause this function to fail. Marketing Cloud Engagement honors any character sets specified in the content-type header. For example, you can use a UTF-8 encoded HTML file with content-type: text/html; charset=utf-8 included in the header. If the header doesn’t specify the encoding, the application assumes that all returned data uses WindowsCodePage 1252 the character set. The timeout value for this function is 30 seconds.

The function has the properties listed in this table.

OrdinalTypeDescription
1StringRequired. The URL to send data to.
2StringRequired. The content-type header value to use in the request.
3ObjectRequired. The payload of the POST request.
4ArrayRequired. An array of header names to include in the POST request.
5ArrayRequired. An array of header values to include in the POST request.
6ArrayRequired. An array that holds the response data for the POST request.

The function returns a numeric HTTP status code. For example, if the request is successfully received, the return value is 200.

This example sends a simple JSON object to https://example.com by issuing a POST request.