request
Performs HTTP request.
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"params" (required) | Object | undefined | null |
Parameters
Key | Type | Description | Default Value |
---|---|---|---|
"additionalHeaders" | AdditionalHeaders | Additional HTTP headers to send. | null |
"appendMosGetParams" | Boolean,String | Determines if the mos. GET parameters will be appended. | false |
"appendMosHeader" | Boolean,String | Determines if the mos. headers will be appended. | false |
"async" | Boolean | Specifies whether the action should perform asynchronously. | null |
"complexResponse" | Boolean,String | Determines if the response should be in a complex object. | false |
"contentType" | String | The HTTP content type, e.g. JSON. | "Form Data" |
"filesQuery" | String | The query for adding local files. | null |
"filesQueryParams" | Array | The params to append to the query. | null |
"filesTable" | String | The table for adding local files. | null |
"localImages" | Array | List of locally saved images to append to the request. | null |
"maxRetries" | Number | The maximum amount of retries for this request. | 0 |
"method" | String | The HTTP method. | "GET" |
"onError" | String | The error event name or the field for the result. | null |
"onErrorType" | OnErrorType | Type of event that will be fired on error. | null |
"onSuccess" | String | The success event name or the field for the result. | null |
"onSuccessType" | OnSuccessType | Type of event that will be fired on success. | null |
"post" | Object | Object containing the request body. | null |
"queryMap" | Array | Map for adding database data to the request body. | null |
"retryDelay" | Number | The delay between retries in seconds. | 0 |
"showRetry" | Boolean,String | Determines if the current retry count should be visible. | false |
"url" | String | The target URL. | null |
"webSocket" | String | The websocket URL. | null |
Inherited
From Base Action
Base Action
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"dynamicParams" | Object | Dynamic params to retrieve data from a specific context e.g. a userSetting. | null |
"leadingDelimiter" | String | The leading mustache delimiter to use. | null |
"params" | Object,Array | Object containing the properties of the action. | null |
"trailingDelimiter" | String | The trailing mustache delimiter to use. | null |
"type" | String | Type 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.