Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

send method

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




varBody [in, optional]

Type: any

Any that specifies the body of the message being sent with the request.


A binary data. See FileReader.readAsArrayBuffer.


A Blob (binary data object).


A documentnode.


A typed array view of an ArrayBuffer.


A DOMString.


A FormData object.


Return value

This method does not return a value.

Standards information


IHTMLXMLHttpRequest::send was introduced in Windows Internet Explorer 7.

This method is synchronous or asynchronous, depending on the value of the varAsync parameter in the IHTMLXMLHttpRequest::open method call. If synchronous, this call does not return until the entire response is received or the protocol stack time out period expires. If asynchronous, this call returns immediately.

This optional varBody parameter may be a BSTR, SAFEARRAY of unsigned bytes (VT_ARRAY | VT_UI1), or an IDispatch to an XML Document Object Model (DOM) object. For additional information, see send Method (IXMLHTTPRequest).

Warning  It is now possible to use XMLHttpRequest to upload extremely large objects, such as Blob objects and FormData objects, which may take a long time to complete. Because Windows Store apps using JavaScript can be terminated at any time, there is a risk the upload will not complete. Consider using the Windows Runtime file upload APIs, such as BackgroundTransfer, for these operations. For more information, see Quickstart: Uploading a file.

An ArrayBufferView is a typed array view of an ArrayBuffer. Introduced in Internet Explorer 10, an ArrayBuffer is a unformatted block of raw data that is sent in its entirety to a server. By using a typed array to define the format of the buffer, and the start and length (number of elements), you can send portions of an ArrayBuffer to a server.

See also




Community Additions

© 2015 Microsoft