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.
The General tab has the following fields.
These parameters are specified in the parameters element on the Input tab.
Provide a short description for the Send HTTP Request activity.
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 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 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.
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.
If you add any Standard HTTP Header as a name value pair in the Dynamic Header section in the client end, on the server side this is listed under the Headers section.
This element contains a repeating element named mimePart that contains each mime attachment.
For more information about MIME headers and their syntax, see http://www.faqs.org/rfcs/rfc2045.html.
Note: When the content type is specified as "text/*" (for example, "text/xml" ), the attachment content is in either the textContent input element or the file name storing the attachment is in the fileName input element . When the content type is anything other than "text/*" , the attachment content is in either the binaryContent input element or the file name storing the attachment is in the fileName input element .
The element can be one of the following:
The following is the output of the activity.
Input Item | Datatype | Description |
---|---|---|
Header | complex | The fields of the header specified on the Output Editor tab. |
For more information about these items, see the description of the Output Editor tab.
For more information about status codes in the HTTP responses, see the HTTP specification at w3.org.
If no method is specified in this element, by default the GET method is used.
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 dynamic headers consist of the following information:
You can consider the following overriding conditions.
This element contains a repeating element named mimePart that contains each mime attachment.
For more information about MIME headers and their syntax, see http://www.faqs.org/rfcs/rfc2045.html.
Note: When the content type is specified as "text/*" (for example, "text/xml" ), the attachment content is expected to be in either the textContent input element or the file name storing the attachment is expected to be in the fileName input element . When the content type is anything other than "text/*" , the attachment content is in either the binaryContent input element or the file name storing the attachment is in the fileName input element .
The element can be one of the following:
The Fault tab lists the possible exceptions generated by this activity. For more information about error codes and the corrective actions to take, see the ActiveMatrix BusinessWorks Error Codes guide.
Fault | Generated When.. |
---|---|
ActivityTimedOutException | A timeout has been reached. |
HttpClientException | The HTTP server responds with a message containing the 4XX status code. |
HttpServerException | The HTTP server responds with a message containing the 5XX status code. |
HttpCommunicationException | An HTTP exception occurred while executing the specified method, or when trying to read the response. |
The following are the details about Send HTTP Request activity threading policy.
Activity Type | Multi-Threaded? | Default Thread Count | Thread Count Configuration |
---|---|---|---|
Asynchronous | Yes | Dynamic | This field can be configured by using the Thread Pool shared resource. |
Activities that support policies display the Policy tab. To associate a new or existing policy with the Send HTTP Request activity, click the Add Policy to Activity icon. To edit policy details, click Go to selected Policy icon. The Policy tab has the following fields.
Field | Description |
---|---|
Name | The name of the policy. |
Type | The type of policy associated with the activity. The Send HTTP Request activity can support the Basic Credential Mapping policy. |
Description | A description of the policy. |
Copyright © 2001-2022 . TIBCO Software Inc. All Rights Reserved.