Skip to main content
Version: 4.56

request

Performs HTTP request.

Field Configurations

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"additionalHeaders"AdditionalHeadersAdditional HTTP headers to send.null
"appendMosGetParams"Boolean,StringDetermines if the mos. GET parameters will be appended.false
"appendMosHeader"Boolean,StringDetermines if the mos. headers will be appended.false
"appendSecret"BooleanDetermines if this request should append the mos secret.false
"async"BooleanSpecifies whether the action should perform asynchronously.null
"complexResponse"Boolean,StringDetermines if the response should be in a complex object.false
"contentType"StringThe HTTP content type, e.g. JSON."Form Data"
"customSecret"StringA custom secret for this request.null
"filesQuery"StringThe query for adding local files.null
"filesQueryParams"ArrayThe params to append to the query.null
"filesTable"StringThe table for adding local files.null
"localImages"ArrayList of locally saved images to append to the request.null
"maxRetries"NumberThe maximum amount of retries for this request.0
"method"StringThe HTTP method."GET"
"name"StringThe name of the request.null
"nameClashResolution"NameClashResolutionThe strategy on how to react to a clash of names."wait"
"onError"StringThe error event name or the field for the result.null
"onErrorType"OnErrorTypeType of event that will be fired on error.null
"onSuccess"StringThe success event name or the field for the result.null
"onSuccessType"OnSuccessTypeType of event that will be fired on success.null
"post"ObjectObject containing the request body.null
"queryMap"ArrayMap for adding database data to the request body.null
"retryDelay"NumberThe delay between retries in seconds.0
"showRetry"Boolean,StringDetermines if the current retry count should be visible.false
"url"StringThe target URL.null
"webSocket"StringThe websocket URL.null

Inherited

From Base Action

Base Action

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params"Object,ArrayObject containing the properties of the action.null
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type"StringType name of the action.null

Examples

Example 1: Simple POST request

Send a POST request to a given URL as a JSON object and add UID as header.

{
"type": "request",
"params": {
"url": "https://example.mobilitysuite.de/post",
"method": "POST",
"additionalHeaders": [
{
"type": "userSetting",
"headerName": "user",
"key": "AF_SETTING_USERUID"
}
],
"contentType": "json",
"post": {
"name": "example request"
},
"onSuccess": "requestSuccessfull",
"onError": "requestFailed"
}
}

The actions to be executed are specified in the actions parameter, in this case a request action.

Result:

A request action has been created.

Example 2: Simple GET request

Send a GET request.

{
"type": "request",
"params": {
"url": "https://example.mobilitysuite.de/post",
"method": "GET",
"onSuccess": "requestSuccessfull",
"onError": "requestFailed"
}
}

The actions to be executed are specified in the actions parameter, in this case a request action.

Result:

A request action has been created.