Share via


send Method (IXMLHTTPRequest) (Windows Embedded CE 6.0)

1/6/2010

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

Script Syntax

oXMLHttpRequest.send(varBody);

Remarks

Ee502359.collapse(en-US,WinEmbedded.60).gifScript Parameters

  • varBody
    [optional] Variant. Case-insensitive name.

Ee502359.collapse(en-US,WinEmbedded.60).gifScript Return Value

None.

Ee502359.collapse(en-US,WinEmbedded.60).gifC/C++ Syntax

HRESULT send(
  VARIANT varBody
);

Remarks

Ee502359.collapse(en-US,WinEmbedded.60).gifC/C++Parameters

  • varBody
    [in, optional] The body of the message being sent with the request.

Ee502359.collapse(en-US,WinEmbedded.60).gifC/C++ Return Values

  • S_OK
    Value returned if successful.
  • E_FAIL
    Value returned if an error occurs.

Ee502359.collapse(en-US,WinEmbedded.60).gifRequirements

Header msxml2.h, msxml2.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

General Remarks

This method is synchronous or asynchronous, depending on the value of the bAsync parameter in the open Method (IXMLHTTPRequest) 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 XML Document Object Model (DOM) 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 UTF-8. 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 XML DOM object, the response is encoded according to the encoding attribute on the <? declaration in the document. If there is no XML declaration or encoding attribute, UTF-8 is assumed.

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.

This method applies to the following interface:

IXMLHTTPRequest

See Also

Reference

XML HTTP Methods

Concepts

open Method (IXMLHTTPRequest)