This activity may be used to send name-value pairs to an HTTP server (usually using the HTTP POST method) and to receive response data from the server.
The activity is valid only with an outbound HTTP session – that is one that was initiated using the HTTP_BEGIN_OUTBOUND activity. For more information on outbound HTTP processing in LANSA Composer, refer to:
HTTP Outbound (Client) Processing in LANSA Composer
The name-value pair data is specified by populating a synchronized pair of variable lists and specifying the variable lists on the HTTP_SEND_NAMES and HTTP_SEND_VALUES parameters.
After executing this activity, if response content is received (as identified by the output parameter values), then your Processing Sequence may use one or more of these activities to receive the HTTP response content:
|
\
If you wish to send further HTTP requests you should use the following activity before preparing and sending the next request:
|
INPUT Parameters:
HTTP_HANDLE: Required
This parameter must specify the session handle value that identifies the HTTP session upon which this activity should operate. The session handle value is returned by the HTTP_BEGIN_OUTBOUND activity.
HTTP_SEND_NAMES: Required
This parameter specifies the "names" for the name-value pairs to be sent. You must specify at least one name, but the parameter is treated as a variable list so that you can send multiple name-value pairs by populating the variable list with the required names before executing this activity.
HTTP_SEND_VALUES: Required
This parameter specifies the "values" for the name-value pairs to be sent. You must specify at least one value, but the parameter is treated as a variable list so that you can send multiple name-value pairs by populating the variable list with the required values before executing this activity.
HTTP_URI: Optional
This parameter specifies an alternate value used to override the URI that is specified in the HTTP outbound configuration and/or on the HTTP_BEGIN_OUTBOUND activity parameter. If used, the value should specify the URI to be used to connect to the remote host specified in the HTTP outbound configuration. If this parameter is not specified, then the value will be taken from the HTTP configuration or from the HTTP_BEGIN_OUTBOUND activity parameter, if specified.
HTTP_METHOD: Optional (Advanced)
This parameter specifies the HTTP request method to be used for the outbound HTTP request. The HTTP protocol standard defines several methods and user-defined methods can be used for REST style applications. The default value is POST and that would be the most usual value used with this activity.
OUTPUT Parameters:
HTTP_RESPONSESTATUS:
Upon successful completion, and if the HTTP Configuration Details specify that the request should wait for a response, this parameter will contain the response status code received from the HTTP server. For example, a status of 200 usually indicates that the request has succeeded. For more information on HTTP response status codes refer to Status Code Definitions.
HTTP_RESPONSEMESSAGE:
Upon successful completion, and if the HTTP Configuration Details specify that the request should wait for a response, this parameter will contain the response reason received from the HTTP server, if any. The reason (message), if provided, gives a human readable description of the response status code. For example, response status 200 will often be accompanied by a reason 'OK', usually indicating that the request has succeeded. For more information on HTTP responses refer to Response.
HTTP_CONTENT_TYPE
Upon successful completion, and if the HTTP Configuration Details specify that the request should wait for a response, this parameter will contain the actual value of the CONTENT-TYPE header in the HTTP server's response, if any. For example, text/plain.
HTTP_CONTENT_LENGTH
Upon successful completion, and if the HTTP Configuration Details specify that the request should wait for a response, this parameter will contain the content length of the content received on the HTTP server's response, if any.
HTTP_RESOLVED_TYPE
Upon successful completion, and if the HTTP Configuration Details specify that the request should wait for a response, and if response content is received, the activity will resolve the content type received in the HTTP server's response to a single special value that best fits the content type received. For example, it will be set to *MULTIPART for multipart content, or it may be set to values such as *TEXT, *XML etc. Refer to the HTTP Configuration Details for a full list of types.