The HTTP Request step, as the name suggests, is used to send messages to a server. Through this action, you can achieve data interaction across systems, such as querying employee leave balances from a human resources system, submitting orders to an ERP system, or integrating with any third-party system. The request content includes: URL, method, authentication type, headers, and request body. You can also store the server response and status code in variables for use in subsequent process logic or for display in forms.
Note:
The HTTP Request step type is suitable for various types of forms, including list forms, approval forms, dashboards, and public forms.
Configuring the HTTP Request
HTTP Address
This field is used to enter the server endpoint for the request.
Click the icon on the right side of the input field to open the expression editor, where you can enter a static text address or select a variable to dynamically specify the address. For example,
https://www.google.com/search?q=Yeeflow
.In the expression editor, you can construct the server address by combining variables.
Method
No Authentication: Even if you select no authentication, your server API may have been whitelisted, or it may require a token to be set in the request header for authentication. For example, authenticate using an API key specified in the API address:
โhttp://api.openweathermap.org/data/2.5/forecast?id=524901&APPID={APIKEY}
Username/Password: Specify the username and password for accessing the API.
Built-in HTTP Service: Suitable for the internal API of the system; this service will automatically handle the authentication task.
HTTP Header
You can use dictionary-type variables to assign key-value mappings for the request headers. For example: specify content type or authentication tokens.
Note: You can use the Set Variable action to store the response data in a designated variable for processing in subsequent workflow logic.
Data: The data field is the body of the HTTP request to be sent to the server. You need to use the expression editor to compose your content according to the server API's definition.
Status Code: Assign a variable to store the status code of the server response. Generally, 2xx indicates a successful call; however, this depends on the definition of your server API.
Result: Assign a variable to store the content of the server response.