send method
Sends an HTTP request to the server and receives a response.
Syntax
object.send(varBody);
Parameters
varBody [in, optional]
Type: anyAny that specifies the body of the message being sent with the request.
Value Meaning ArrayBuffer A binary data. See FileReader.readAsArrayBuffer.
blob A Blob (binary data object).
Document A documentnode.
ArrayBufferView A typed array view of an ArrayBuffer.
string A DOMString.
FormData A FormData object.
Return value
This method does not return a value.
Standards information
- XMLHttpRequest, Section 3.6.3
- XMLHttpRequest, Section 4.7.6
Remarks
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
Reference