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 |
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 |
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) |
|
Attach File |
If you want to send HTTP body data in the form of a data file, check this option. It will enable a field where you can define the data file to be sent. Select the name of the data file from the drop-down list. If required, click |
String |
If you intend to send HTTP body data as a string, use this default option (only active if you do NOT check the "Attach File" option) to insert the string to be sent. Enter it or click |
Continue to the "Response" tab.
Response tab
Fill in the following options:
Response (Body/Header) |
|
To File |
If you want to receive/store the response body in a file, check the "To File" option. Once checked, this option activates a "File" drop-down. Select one of the available data files. If required, click
|
Variable |
This is the default option. Click
|
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 certain features regarding the input box's option as well as general actions such as "Copy"; "Paste"; "Search".
Ex: If you right-click the "Variable" input box (included in a "Conversion's" properties window), you are provided with the "Search..."and "Variable Select" options.
If you right-click another input box, it will provide other possibilities.