The SendHTTP component uses an HTTP POST to transmit data from the specified field on a Transport Dictionary or order form to a Web page (cgi, ISAPI, ASP, and so on). Often the receiving Web page will invoke another pipeline to perform further processing on the received data. Optionally, SendHTTP can store the response returned from the Web page, and the component saves that response into the specified field on the Transport Dictionary or order form. SendHTTP can work with text, UNICODE, and binary data.
When you configure the SendHTTP component, you specify the format in which the component is to post the contents of the specified field. Binary data should be posted as Binary. Text data may be posted as Text (ASCII/Multi-Byte Character Set blob) or UNICODE. UNICODE provides the best support for multi-lingual environments, however many Web servers do not support it.
Optionally, SendHTTP can store the response of the post. If desired, specify a destination field and the type of the data that is expected in the response. Usually, Web pages return text (ASCII/MBCS) data, however SendHttp also lets you store UNICODE or binary responses.
The resource specified on the SendHTTP component’s URL parameter can be based on any server-side solution that can accept posts, including ISAPI, cgi, and ASP. When using ASP, use the following methods to read data posted in the following types:
Post type | ASP function |
---|---|
Text | Request.Form |
UNICODE | CStr(Request.BinaryRead(Request.TotalBytes)) |
Binary | Request.BinaryRead(Request.TotalBytes) |
Use the following ASP functions to send response data of the following types.
Response type | ASP function |
---|---|
Text | Response.Write |
UNICODE | Response.BinaryWrite |
Binary | Response.BinaryWrite |
For an example of a receiving .asp page, see the recvHTTP.asp file, which is installed by default into \Microsoft Site Server\SiteServer\Commerce.