HTTP_POST

LANSA Composer

HTTP_POST

This activity may be used to send data to an HTTP server (usually using the HTTP POST method) and/or to receive response data from the server.

This activity is used with an HTTP outbound configuration which can specify most of the parameters necessary to establish the connection to the HTTP server and to identify the file to be sent to the HTTP server.  Selected attributes of the HTTP outbound configuration may be overridden by the parameters to this activity.

A notification event named HTTPFAILED is available for this activity. If this event is active and a failure occurs in the activity, then the notification event will be fired to send an email or other supported form of notification.

INPUT Parameters:

HTTPCONFIG : Required

This parameter must specify the name of an HTTP outbound configuration that specifies most of the parameters necessary to establish the connection to the HTTP server and to identify the file to be sent to the HTTP server.  Selected attributes of the HTTP outbound configuration may be overridden by the other parameters to this activity, as described below.

URI : Optional

This parameter may specify an alternate value used to override the URI that is specified in the HTTP outbound configuration. 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.

CONTENTFILEDIR : Optional

This parameter is optional. If it contains a non-blank value it will be used as the directory on the local server in which the content payload file is found (the file containing the data to be sent to the HTTP server).  If this parameter is not provided, then the value will be taken from the HTTP configuration.

CONTENTFILENAME : Optional

This parameter is optional. If it contains a non-blank value it will be used as the content payload file name (the file containing the data to be sent to the HTTP server).  If this parameter is not provided, then the value will be taken from the HTTP configuration.

CONTENTFILETYPE : Optional

This parameter is optional. If it contains a non-blank value it will be used as the content type.  If this parameter is not provided, then the value will be taken from the HTTP Configuration.

If the content file type in this parameter and in the HTTP configuration are blank, or specify the special value *AUTO, then the content type will be derived from the file extension of the file being sent.  (This is achieved by a lookup on the file filetype.txt in the <system> directory of the server's JSM instance directory tree.)

Refer to the 2.3.3 HTTP Configuration, Outbound, for the format and possible special "shorthand" values you may specify for this parameter, such as *XML, *HTML, *CSV, *PDF and *ZIP.  However, you are not limited to those values – you may explicitly specify an actual content type such as application/zip.

RETURNFILEDIR : Optional

This parameter is optional. If it contains a non-blank value it will be used as the directory on the local server in which return payload file is saved (the file containing the HTTP response data received from the HTTP server).  If this parameter is not provided, then the value will be taken from the CONTENTFILEDIR.

RETURNFILENAME : Optional

This parameter is optional. If it contains a non-blank value it will be used as the return payload file name (the file containing the HTTP response data received from the HTTP server).

HTTPMETHOD : Optional (Advanced)

This parameter may specify 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 when you are using the HTTP_POST activity to "send" a file to a remote server via HTTP.  One common alternate HTTP method is GET - you can use the HTTP_GET activity to issue GET requests - you would use GET when you have no content to send but you are using the activity to receive content from the remote HTTP server.

HTTPHEADERNAME: Optional (Advanced)
HTTPHEADERVALUE - Optional (Advanced)

These two parameters may optionally be used to specify one or more HTTP header names and corresponding HTTP header values to be added to the HTTP header for the outbound request.  Note that the activity already adds several common and "standard" properties to the request header.  You might use these parameters when your application requires you to specify additional HTTP header properties such as 'AUTHORIZATION' or custom properties specific to the HTTP server application.  The parameters are lists, allowing you to specify multiple values in each list by assigning them using a list index.  The activity will add as many properties as you specify in the HTTPHEADERNAME list.  If used, it is your responsibility to ensure that each HTTPHEADERNAME list entry has a corresponding HTTPHEADERVALUE list entry containing the corresponding HTTP header property value.

OUTPUT Parameters:

There are no output parameters.