Platform.Function.HTTPGet()
Retrieves information from a URL by issuing an HTTP GET request. This function only works with HTTP on port 80 and HTTPS on port 443. The function times out after 30 seconds.
The function has the properties listed in this table.
Ordinal | Type | Description |
---|---|---|
1 | String | Required. The URL to retrieve content from. |
2 | Boolean | Required. Indicates whether the request continues if an error occurs during the process. If the value is true , the request terminates if an error occurs. If the value is false , the request continues if an error occurs. |
3 | Numeric | Indicates how the function handles a URL that returns empty content. A value of 0 allows empty content. A value of 1 returns an error. A value of 2 skips the subscriber. |
4 | Array | Required. An array of header names and values to include in the GET request. |
5 | Array | Required. An array that contains HTTP code of response to function. |
6 | String | The name of a variable that stores the status code for the request. |
This function returns a numeric status.
- A value of
0
indicates that the request completed successfully. - A value of
-1
indicates that the URL wasn’t found. - A value of
-2
indicates that error occurred in the HTTP request. - A value of
-3
indicates that the function completed successfully but didn’t return any content.
This example retrieves data from a URL by using a GET request.