Send HTTP Request

Send HTTP Request is an asynchronous activity that sends an HTTP request and waits for a response from the web server. This activity sends a request to a server that is compliant with either the HTTP 1.0, 1.1, or 2.0 specification. HTTP 2.0 is supported only when the HTTP version at the client shared resource is set to HTTP 2. ActiveMatrix BusinessWorks automatically sends the request using the correct version based on the version supported by the HTTP server. Therefore, do not specify the HTTP version of the server you are sending the request to.

Note: When configuring an HTTP activity, configuring an HTTP Connector shared resource as the value for a module property is not supported. Configure a literal value instead.

General

The General tab has the following fields.

These parameters are specified in the parameters element on the Input tab.

Description

Provide a short description for the Send HTTP Request activity.

Advanced

The Advanced tab has the following fields.

Field Literal Value/ Module Property Description
Provide Client Resource None Select this check box to dynamically select the needed HTTP client resource. When you select this check box, Host and Port fields disappear, and the ClientResource field appears in the Input tab.
Write to File None Select this check box to write the incoming requests that exceed the specified threshold size to a file instead of storing the request in memory. You can accept large incoming requests without consuming a great deal of memory. Selecting this check box displays the Directory and Threshold Data Size fields.

Not selecting this check box with one or more non-existing directories in the specified path in the Directory field, raises an exception.

Specifying zero (0) in this field causes all incoming requests to be saved to a file.

Input Editor

Input Editor comprises the data structure of the headers of the HTTP request and HTTP reply message. You can either use the default structure or modify the structure, if the outgoing request or the reply to the request has a specific data structure for the header.

Note: If you add a new primitive element, and that element is not a defined HTTP standard header, the server lists the element in the DynamicHeaders section.

Input Header Datatype Description
Accept string This field specifies media types that are acceptable for response messages for the request. For example, text/* , text/html . Media types are described in the HTTP specification at w3.org.

If no Accept-Header field is specified, all media types are acceptable on the server.

If no Accept-Charset header is specified, any character set is acceptable on the server.

For more information about this header field, see HTTP specification at w3.org.

You can set the cardinality for this element to Repeating (*) to specify more than one cookie. You can also specify multiple name or value pairs in a single non-repeating element by separating each pair with a comma (for example, " name1=value1 , name2=value2 ").

For more information about this field, see the HTTP specification at w3.org.

Output Editor

Output Editor comprises the data structure of the headers of the HTTP request and HTTP reply message. You can either use the default structure or modify the structure, if the outgoing request or the reply to the request has a specific data structure for the header.

The HTTP protocol defines the header structure. For more information about the fields and content of the header of an HTTP request, see the HTTP specification at w3.org.

Output Header Datatype Description
Allow string This field lists the set of methods supported by the resource identified by RequestURI.
Content-Type string This field indicates the media type of the entity body for the outgoing message and the incoming response. Media types are described in the HTTP specification at w3.org.

An example of the media type is text/html ; charset=ISO-8850-4

Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type.

For more information about this field, see the HTTP specification at w3.org.

Note: For correct parsing and processing of cookies, input must be in the format "key=value".

For more information about this field, see the HTTP specification at w3.org.

For more information about this field, see the HTTP specification at w3.org.

Input

The following is the input for the activity.

Input Item Datatype Description
ClientResource string This field appears when you select the Provide Client Resource check box on the Advanced tab. Provide the HTTP client shared resource name to which you want to connect dynamically.

The client resource name to be provided in the input tab should be of the form . .

Note: Do not provide .httpClientResource extension in the client resource name.

If no method is specified in this element, the GET method is used by default.

For more information about this input element, see Sending Data in the HTTP Request

For more information about this input element, see Sending Data in the HTTP Request

Note: You can use only US-ASCII characters in DynamicHeaders .

The DynamicHeaders consists of the following information:

You can consider the following overriding conditions.