HTTP Request (Action)
Event action – Abstract
Purpose: This event action executes an HTTP request with a supported method (GET, POST, PUT, PATCH, DELETE) and grants access to the response.
The HTTP Request (Action) event action executes an HTTP request for a supported Method (GET , POST , PUT,PATCH, DELETE), taking into account the other configured parameters (see 'Configuration' for more details).
The URL must contain a protocol (e.g. https) and a web address that can be resolved by the Lobster Data Platform / Orchestration server.
The URL and Query parameters are located in the header area of an Expandable element, whose detail area (shown expanded in the screenshot above) contains further parameters (see ‘Configuration’ for more details).
From a technical point of view, specifying a string for the Query parameter is optional. It enables value assignments to URL parameters that are taken into account according to the syntax of the Method.
The Request Header and Payload parameters define the header and any ‘payload’ to be transmitted for the request (see ‘Configuration’ for more details).
If the URL can be resolved and the addressed server responds, the response is prepared as follows:
A data object of the ‘Storage’ (Storage) type is generated from header information, which is stored in the httpResponseHeaders Variable by default (see Response Headers parameter of the response).
A data object of the ‘Content’ (Content) type is generated from the body that may be provided depending on the selected Method, which is saved in the httpResponseContent Variable by default (see Response Content parameter).
Configuration
The HTTP Request (Action) event action does not expect a specific reference object. However, value configurations for parameters can access the applicable reference object.
All parameters can be defined by value configurations if required. If a static value is configured (see Static values) and the relevant form element is displayed in conjunction with a small grey arrow (bottom left), this must be clicked on to switch to the value configuration.
Parameter |
Data type |
Default value |
Usage |
Method |
Text (String) |
GET |
The text value for the Method, which can either be entered directly or determined dynamically via a value configuration at runtime, must correspond exactly to the name of one of the supported HTTP Methods. The event action only supports the HTTP methods in the following whitelist:
This positive list could be expanded in future versions. ►IMPORTANT◄ In many cases, an unsuitable input/configuration for the ‘Method’ parameter does not generate an error message because GET is executed as a fallback. The following rules apply to the interpretation of text values for the Method parameter:
The following examples illustrate the potential effects:
|
URL |
Text (String) |
No value |
The text value for the URL, which can be entered directly or determined dynamically via a value configuration at runtime, must specify the protocol to be used (e.g. http or https) before the path follows in the applicable syntax. ►NOTE◄ If the HTTP request uses URL parameters, the complete HTTP query string must be defined via the Query parameter. If the string for the URL contains an HTTP query string, this is ignored. |
Query |
Text (String) |
No value |
A text value can optionally be provided in the Query parameter, either by direct input or dynamically determined at runtime via a value configuration, which is attached as an HTTP query string to the string defined as the URL. The separator (?) provided in the URL syntax is inserted automatically. It should therefore not be included in either the URL string or the Query string. The Query string can concatenate several value assignments with the <key>=<value> scheme using the & separator. Example: The following Query string contains assignments for three parameters: token=DEMO®ion=APAC&fromDate=2025-01-01 |
Request Headers |
Storage |
No value |
The optional value configuration for the Request Headers parameter should return a ‘Storage’ data object at runtime that contains the information for the HTTP Request Header. |
Payload |
Content |
No value |
The value configuration for the Payload parameter should return a ‘content’ (Content) data object at runtime, whose body field contains the actual ‘payload’ for the HTTP request.
►IMPORTANT◄ If the value configuration for the Payload parameter returns a type other than ‘Content’ (Content), an attempt is made to convert the return value to this type. This is possible, for example, based on a String value. However, if the return value cannot be converted to ‘Content’ (Content), an attempt is made to execute the Method without a Payload. This may cause errors. |
Response Headers |
Storage |
Variable |
The optional value configuration for the Response Headers parameter defines the target of a value assignment for the ‘Storage’ (Storage) data object generated at runtime, whose fields reflect the header information from the HTTP response. In this way, the Response Headers can be analysed after the HTTP Request (Action) event action has been executed. ►IMPORTANT◄ The ‘Storage’ (Storage) object generated as the Response Headers typically contains the RESPONSE_CODE, which indicates whether the HTTP request was processed successfully or with errors. The Response Headers can be analysed further if necessary in the event of an error.
|
Response Content |
Content |
No value |
The optional value configuration for the Response Content parameter defines the target of a value assignment for the ‘Content’ (Content) data object generated at runtime that maps the ‘payload’ of the Response.
►NOTE◄ If the Show content event action is used to display the ‘Content’ object from the return value, the value in the mediaType field can be overridden if necessary to influence how the content is handled by the browser. |
The following parameters are contained in the detail area of an Expandable that is collapsed by default. |
|||
HTTP Channel ID |
Integer |
No value |
The HTTP Channel ID parameter can be used to reference a channel created in (see Kanäle). If a value configuration exists that refers to a valid HTTP Channel ID (Long value) at runtime, the information stored there (see Eigener Zugang (Ich zum Partner)) is used to authenticate the HTTP request:
|
Certificate ID |
Integer |
No value |
If the authentication of the HTTP requests requires your own certificate stored on the server side (see Eigene Zertifikate), this can be referenced via the Certificate ID parameter by setting up a value configuration that returns a Long value at runtime that matches the internal ID of the certificate in question. |
Enable streaming |
Boolean value |
No value |
The Enable streaming option must be selected so that server-sent events (SSE) provided in response to a request can be processed individually (s. Server-sent Events (SSE) verarbeiten). The media type (mediaType) for the Response content is always text/event-stream. The stream of SSEs (server-sent events) can be processed after the HTTP Request (Action) has been executed by reading the httpResponseContent variable in the head of a loop. Each iteration of the loop then refers to exactly one of the events as a reference object. The Enable streaming option has the following effect:
|
Via DMZ |
Boolean value |
No value |
If the Via DMZ option is selected, the HTTP request is executed via the DMZ. The selection of the option can either be defined statically via the Check box element in the configuration or bound to a value configuration that returns a Boolean value (Boolean) at runtime. |
Timeout |
Integer |
90 |
The Timeout parameter defines an upper limit for the runtime of the HTTP requests in seconds. A value of 90 (seconds) is assigned by default. If the runtime of HTTP requests exceeds the limit defined by the Timeout, the execution is cancelled. The event handling is not cancelled, however, so that the ‘Storage’ (Storage) data object generated by the Response Header can then be evaluated to determine whether a Timeout has occurred
|
Retries |
Integer |
0 |
The Retries parameter defines the number of attempts to be made if the HTTP request does not return a response with a RESPONSE_CODE in the header.
|