This topic describes how to configure the HTTP Request component. This component allows you to send HTTP requests to a specified URL.
Component information
Icon
![]()
Name
HTTP Request
Preparations
Go to the canvas page of an existing flow or a new flow.
Go to the canvas page of an existing flow.
Log on to Chat App Message Service Console. Choose Chat Flow > Flow Management. Click the name of the flow that you want to edit. The canvas page of the flow appears.

Create a new flow to go to the canvas page. For more information, see Create a flow.
Procedure
Click the HTTP Request icon on the canvas to view the configurations on the right.

Configure the component based on your needs. For more information, see Parameters.
Click Save in the upper-right corner. In the message that appears, click Save.

Parameters
Parameter | Description | Example |
Request Method | The request method. Valid values:
|
|
Timeout | The response timeout duration. | |
URL | Set the URL that receives the request. | |
Content Type | The content type. Valid values:
| |
Failure branch | Enable Failure Branch to handle the flow when the request fails. |
|
Request Header Configuration | Enter the following information:
|
|
Request Body Configuration | When the request method is POST, you can configure the request body. Key-Value:
Raw: The raw value must be entered manually. For more information, see Request body configurations and examples. |
|
Request Path Configuration | When the request method is GET, you can configure the request path.
|
|
Response Variable Configuration | Ensure that the variable name matches the key of the JSON object of the response. |
|
Request body configuration and examples
The request body configuration supports two methods: Key-Value and Raw.
Key-Value: This method is recommended when your request body structure is relatively simple. You can refer to the following example:
Set the key of the first key-value pair to MyName with the value haiwei.dhw; the key of the second key-value pair to customerName with the value as the variable {{customerName}}.
At this time, the data format for the content type application/json would be: {"myName": "haiwei.dhw", "customerName": "{{customerName}}"}; the data format for the content type application/x-www-form-urlencoded would be: "myName=haiwei.dhw&customerName={{customerName}}".

Raw: This method is recommended when your request structure is more complex. You can freely edit the entire request body. The raw value of the request body must correspond to the selected content type, which can be either application/json or application/x-www-form-urlencoded.
application/json
For the content type application/json, refer to the following example:
{ "customerNames": [ { "name": "{{customerName}}", "type": "vip", "intentional": true, "intentionLevel": 5 } ], "myName": "haiwei.dhw", "someConplicatedStructure": { "a": { "b": "c" } } }
application/x-www-form-urlencoded
For the content type application/x-www-form-urlencoded, refer to the following example:
customerNames[0][name]={{customerName}}&customerNames[0] [type]=vip&customerNames[0] [intentional]=true&customerNames[0] [intentionLevel]=5&myName=haiwei.dhw&someConplicatedStructure[a][b]=c





