XenoGuard 4.0 Documentation

Request

ActionStep Reference » Windows » Network » HTTP » Request 

The ActionStep HTTP Request communicates with an API or endpoint to either send or receive data using the GET or POST methods.


[-] Hide
  1. Open the Windows node in the Workspace Explorer.
  2. Open the Network node.
  3. In the HTTP node, select the Request ActionStep.

Parameters:

The ActionStep has the following input parameters:


name Description
URL
The URL or web address of an API or endpoint.

The parameter "Replacement" sub-branch:

  • Value - the value set for the URL replacement
Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
HTTP Method
The method to be used for a request.

Accepted Values: GET and POST

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]
HTTP Header Fields
The fields to be set in the HTTP header.

The parameter "Header Field Item" sub-branch:

  • Header Field Name - the name of the field header
  • Header Field Value - the value of the field header
Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Form Field Items
The fields to be set in the HTTP form.

The parameter "Form Field Item" sub-branch:

  • Form Field Name - the name of the form field
  • Form Field Value - the value of the form field
Allowed Context Scopes [Fixed]
Allowed Context Types [Variable, Parameter]
Timeout [ms]
The waiting time in milliseconds for an HTTP request.

Default Value: 12000

Allowed Context Scopes [Fixed]
Allowed Context Types [Variable, Parameter]

Information The GET method is used to request data from an API or endpoint while the POST is used to send data to an API or endpoint. 

Results:

The ActionStep returns the following results:


name
description
JSON Response
The JSON response from an API request.

Allowed Context Scopes [Fixed]

Example 1 (Use GET method to access a random quote from an endpoint):

This example connects to an API and uses the Get method to request a random quote. It is then parsed to display the JSON response in a tree-view structured data and sets the content as the value of the Result. The output is then displayed via Message Box.

Example 2 (Use POST method to create a user account in an endpoint):

This example creates two local variables, email and password, with Text as data type. The variables are subsequently used as parameters to create a user account in an endpoint using the POST method. The JSON response from the API is then displayed in a tree-view structured data. If the request is successful, the ActionStep in the "Then" branch is executed and displays the user's email and id via Write Text, otherwise, the Message Box in the "Else" branch is executed.


See other HTTP operations:

Download
Load Url