Example files

An example for this adapter is located at install_dir/examples/adapters/http.

Using the Map Designer, select HTTP from the Source setting in an Input Card dialog. In the GET Source > Command field, type the -URL command to specify the uniform resource locator (URL) specifying the HTTP server, the file to transfer, and other required adapter commands. In this input card example, the HTTP Adapter retrieves the test.htm file from host server puff:
-URL HTTP//user1:test@puff:8080/c:/test/tst.htm

Using the Integration Flow Designer to override the HTTP Adapter settings for an input card, enter the following for the Source > GET > Source > Command setting in the Launcher settings:

-TV -REDIR 3 -URL HTTP://user1:pass@puff:8080/c:/orb/original.htm

The adapter specifies the original.htm file to be used as the data source. The -TV adapter command specifies that the adapter generate a verbose trace file containing a log of all activity and events occurring while the adapter is retrieving data. The -REDIR 3 adapter command specifies that the HTTP Adapter will follow three file redirections (or "document moved" messages) before the file transfer request fails.

Using the Input Source Override - Application Execution Command (-IA), this command string example can be used to override the adapter commands defined in output card 1:
-IAHTTP1 '-URL HTTP://user1:test@puff:8080/c:/test/test.htm'

This example command string causes the file test.htm to be retrieved from host server puff.

Use the M4HHTP_OPT environment variable to specify commands to the HTTP Adapter or a command file containing adapter commands.
Note: Commands specified in the input or output card settings override commands specified in the environment variable.

The format for specifying commands is:


where adaptercommands are the HTTP Adapter commands in the list of commands.

The format for specifying a command file is:


where filename.txt is the file containing HTTP Adapter commands. Always precede the command file name with @.