Click to return to the XML (Extensible Markup Language) home page    
XMLHttpRequest responseXM...     XMLHttpRequest setRequest...     XMLHttpRequest Object    
Web Workshop  |  XML (Extensible Markup Language)

send Method


Sends an HTTP request to the server and receives a response.

Syntax

oXMLHttpRequest.send(varHeader)

Parameters

varHeader
Variant. Case-insensitive header name.

Remarks

This method is synchronous or asynchronous depending on the value of the bAsync parameter in the open call. If open is called with bAsync == False, this call does not return until the entire response is received or the protocol stack times out. If open is called with bAsync == True, this call returns immediately.

This method takes one parameter, which is the requestBody to use. The acceptable VARIANT 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. The component automatically sets the Content-Length header for all but IStream * input types.

If the input type is a BSTR, the response is always encoded as UTF8. The caller must set a Content-Type header with the appropriate content 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 as UTF8 or UCS2. The component sets a Content-Type header with the appropriate content type and includes a charset parameter.

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

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLHttpRequest


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.