Working with HTTP Request Process

Navigation:  How to Work with Processes > Working with the Web Services Processes Group >

Working with HTTP Request Process

Previous pageReturn to chapter overviewNext page

 

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 to access the URL Assistant. See Detail of URL Assistant.

 

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 and select a variable with that value. See Variable Definition.

Media

Define the desired media for the HTTP request from the drop-down list or click and select a variable with that value.

Headers

Define the desired headers or click and select a variable with that value.

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 to edit the selected data file. See Editing a Data File.

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 and select a variable with that value.

 

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 to edit the selected data file. See Editing a Data File.

 

Variable

This is the default option. Click to select the variable that will receive/store the response body. See To Select/Create a Variable.

 

Full Header

Click to select the variable that will receive/store the web service's headers.

Status Code

Click to select the variable that will receive/store the web service's status code.

Content Type

Click to select the variable that will receive/store the web service's content type.

 

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 list, in case there is a communications error. See Detail of a window below.

HTTP Error

Select a target location from the drop-down or list, in case there is an "HTTP Error". See Detail of a window below.

 

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.