Data Transformation Engine HTTP Adapter Reference Guide

Chapter 4 - Syntax Summary Example Files
HTTP Adapter Reference Guide
26
where adaptercommands are the HTTP adapter commands in the List of
Commands.
The format for specifying a command file is:
M4HTTP_OPT=@filename.txt
where filename.txt is the file containing HTTP adapter commands. Always
precede the command file name with @.
HTTP Header Adapter Command (–HDR) Example
Process cookies by mapping Set-Cookie headers to Cookie headers. This
example uses the Header adapter command (
HDR), Http.mtt type tree, and
HTTPGetCookie map. It retrieves a form that sets cookies and then submits the
form. The form includes user name and password fields typical of the forms found
on many web sites and uses cookies to maintain this login information.
In the input card, the GET > Source > Command in the Source setting uses the
-HDR command to map the cookies in the Set-Cookie headers on the form that is
returned.
In the output card, the PUT > Target > Command in the Target setting
manages the cookie state information by mapping the Set-Cookie headers in the
form to Cookie headers. The -HDR command indicates that the user is providing
the headers; the target is form data submitted with:
Content-Type application/x-www-form-url-encoded.
See RFC 2109 for more information about cookies. For more information about
submitting forms and the x-www-form-url-encoded format, see Section 17 of the
HTML 4.0 specification at http://www.w3.org/TR/REC-html40/.