A HTTP Request Action as described by its name, is used to send a message to server.   By using this action, you can query staff leave balance from your HR system, submit an order to ERP system, and do other interaction with any third party systems.  The request contains the following:

  • URL,
  • Method,
  • Authentication type,
  • Headers,
  • Body of the request

And you may also need to store the server response and status code into variables.  The server's return can be used to determine the subsequent process flow and to display on the form.

The following are detailed description of settings for the HTTP Request:

 mceclip0.png

1. HTTP Address

The server endpoint of the request, for example: https://www.google.com/search?q=YeeFlow.  In expression editor, you can compose your server address by variables, like:

mceclip3.png

2. Method

GET, PUT, POST, DELETE are available options for the HTTP method.  Just pick the one match your sever API definition.

3. Auth Type

  • No authentication, it doesn't mean there's no authentication of your server API.  Your server API may be whitelisted.  Or you need to set a token in request header to pass through the authentication check.  Or, like query OpenWeather API, you need to specify your APIKEY in API address.
    http://api.openweathermap.org/data/2.5/forecast?id=524901&APPID={APIKEY}

  • User/Password, specify user account and password to access the API

  • Build-in HTTP Service, it means you are accessing a YeeFlow API.  The service itself will handle the authentication tasks.

4. HTTP Header

You can assign a dictionary type of variable which contains key & value mappings to be used in request header.  

Note: by using the Set Variable action, you can set values to your dictionary variable.

mceclip2.png

5. Data

Data field is the body of the HTTP request to be sent to the server.  You need to follow the server API definition to compose your content by using the expression editor.

6. Status Code

Assign a variable to store the status code of server response.  In general, 2xx represents a success call.  However, it depends on the definition of your server API.

7. Result

Assign a variable to store the server response content.

 

>>Related case-specific for more learning

Using HTTP Request to return on Form

Was this article helpful?
2 out of 3 found this helpful

Comments

0 comments

Please sign in to leave a comment.