Working with HTTP Request Process
Process Purpose
The HTTP Request process is used to execute an HTTP request to a specific URL (call a web service).
This process is especially useful when dealing with SOAP requests/responses that consist of arrays and/or other complex structures.
To parse the received JSON and XML data, use processes such as "JSON to Variable(s)", "JSON to File", "XML to Variable(s)" or "XML to File".
The parsing of data into a local database requires the use of more processes. Ex: Firstly, parse the data into a data file and, secondly, copy its content into the local database with a "Local File to DB" process.
When you add a process, you are required to define its settings. This occurs in the process's properties window which is displayed automatically after having added the HTTP request process. In this case, the properties window includes four tabs - "URL", "Call", "Response" and "Error".
If any subsequent edition is required, double-click the process to open its properties window and enter the necessary modifications.
URL tab
Fill in the following options:
URL |
Enter the URL or click As an alternative, you can use a variable to define the URL (use the "Variable Select" option that is accessed if you right-click this box). |
Proceed to the "Call" tab.
Call tab
Fill in the following options:
HTTP Request |
|||||||
Method |
Define the desired HTTP method from the drop-down list ("HEAD", "GET", "POST" or "PUT") or click See Variable Definition. |
||||||
Media |
Define the desired media for the HTTP request from the drop-down list or click |
||||||
Headers |
Define the desired headers or click |
||||||
Send (Body) |
|||||||
Source |
Select the source of the request's body - "Variable" (default option) or "File". The selection of the source ("Variable"/"File") affects the related option (located below). |
||||||
Variable/File |
Depending on the selected source, you will access the corresponding field:
|
Continue to the "Response" tab.
Response tab
Fill in the following options:
Response (Body) |
|
Destination |
It is possible to store the response body into a variable (default option) or a data file: •If you keep the default "Variable" option, select the intended target variable by clicking •If you want to receive/store the response body in a file, check the "File" option. Once checked, this option activates a "File" drop-down. Select one of the available data files. If required, click |
Response (Header) |
|
Full Header |
Click |
Status Code |
Click |
Content Type |
Click |
Proceed to the "Error" tab.
Error tab
Fill in the following options:
If … Go to |
|
Comm Error |
Select a target location from the drop-down or |
HTTP Error |
Select a target location from the drop-down or |
Detail of a window:
"S:Menu" is a screen included in the same program as the process.
"R:Routine_1" is a routine included in the same program as the process.
If required, use the icons on the upper right corner of the properties window:
•Click to define a time out. See Time Out.
•Click to attach any relevant notes to this process. Click it and enter your notes in the resulting text box. These notes will be displayed in the corresponding "Actions" tab or "Process" window (in the "Notes" field) and in the "Developer Report".
After filling in the required options, click to conclude or
to abort the operation.
The added process is displayed in the corresponding "Actions" tab or "Process" window.
Use the right-click in MCL-Designer's input boxes to access some related options as well as the general "Cut", "Copy"; "Paste"; "Search" actions (active/inactive according to the current context).
Ex: If you right-click the "Variable" input box (included in a "Conversion's" properties window), you are provided with general editing/search actions and other more specific options such as "Variable Select" (see "Variable Select") ;"Variable Insert" (see "Variable Insert")"Insert Special Character" (see To Insert Special Characters into a Control's Text Input Field) and "Localization Select" (see Localization List).
If you right-click another input box, it nay provide other possibilities.