The HTTP Client collector function collects data from a third-party HTTP server. You can configure this function to set the values for how the HTTP Client function would behave when communication with the third-party HTTP server, and how to specify the method of communication.
You can configure this function in the following settings.
Connection
Operational settings
General settings
Results
Connection
Depending on the users' configuration, three authentication methods are available: None, Basic authentication and OAuth 2.0.
A selectable option from the Authentication type is used to make the selection and based on that separate configuration options are available. There will be additional options for the Authentication type selected.
Operational settings
In Operational settings, enter the following details that determine how you want to handle the errors. The following options are available for HTTP Collector and Processor Functions only:
In Request run limit, specify the number of times the operation should run.
In Action on error, specify the action you want to take in case of an error. You can select from the following options:
Any response with the HTTP status code 4xx or 5xx is considered an error. All errors get logged in the system logs. You can refer to the Logs for more information. The default value is Ignore.
General settings
You select an HTTP request method from the following options:
Include query string in URL – This enables a query string in the token URL.
Customize header - This allows for custom headers to be specified.
Note!
*The Body and Form fields are visible only for request methods POST, PUT and PATCH.
Select Body or Form and add the corresponding details in the content of the request message. You can use Variable Insertion.
Expand the examples below to view samples of HTTP request messages for Body or Form:
Note!
The form input needs to be URL encoded, otherwise, it fails.
HTTP requests use a hardcoded content-type value of ‘application/x-www-form-urlencoded’.
Results
Response Headers
The support for response headers can be enabled by toggling the Enable response headers option. A default value for the key will be added by the engine (httpResponseHeaders) which will match the placeholder for the key input. Configuration is done by filling up the necessary input fields: Result Header Key and Result Key.
HTTP Response Headers Support
By enabling response headers, the overall data size of the HTTP packets will also increase. Caching of the body checkbox is tied to the headers.
This option is available only for the HTTP Client collector and the HTTP Client Processor.
In Result Key, you can assign a name to the result that you receive in response to the request. It is recommended to configure the resulting key to make future references of the same response easy and traceable. The default value is httpResponse.
Token Renewal Support
The collector and processor Functions support token renewal, if the servers return a 401 Token Expiry error.