Post

Issues an HTTP POST request to the provided URL. The function returns a JSON object that contains a status value and the HTTP response.

The Post() function has five parameters.

  • destinationUrl (string): Required. The destination URL for the HTTP POST request.
  • contentType (string): Required. The value to pass for the Content-Type header.
  • content (string): Required. The content of the POST request.
  • headerNames (array): Required. An array of header names to include in the request.
  • headerValues (array): Required. An array of header values to include in the request.

HTTP requests created by this function automatically include the host and content-length headers. The value of host is always set to the domain of the URL that the request was sent to. The value of content-length is always set to the length of the content in the request.

This example issues an HTTP POST request and returns the resulting JSON object.