METHOD:  HttpRequest::send

HttpRequest.send(varHeader)

The send method sends an HTTP request to the server and receives a response. Depending on the value of the 'Async' parameter of the open call this method can be either synchronous or asynchronous. If the 'Async' parameter is true, this call returns immediately; otherwise it does not return until the entire response is received, or the protocol stack times out.

This method takes one parameter: the requestBody to use. Acceptable input types are BSTR, SAFEARRAY of UI1 (unsigned bytes), IDispatch to an XMLDOM object, and IStream. You can only use chunked encoding (for sending) when sending IStream input types.

If the input type is a BSTR, the response is always encoded as UTF-8. The caller must set a Content-Type header with the appropriate coontent type, and include a 'charset' parameter.

If the input type is a SAFEARRAY of UI1, the response is sent as is, without additional encoding. The caller must set a Content-Type header with the appropriate content type.

If the input type is an XMLDOM object, the response is encoded according to the encoding attribute on the '<?' xml declaration in the document. If there is no xml declaration, an encoding attribute of UTF-8 is assumed.

If the input type is IStream, the response is sent as is, without additional encoding. The caller must set a Content-Type header with the appropriate content type.



Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information