||number||The state of the request. Possible values are: 0 - when open() method has not been called yet 1 - when send() methos has not been called yet 2 - when send() method has been called, and headers and status are available 3 - downloading; responseText holds partial data 4 - operation is complete|
||string||The response to the request as text, or null if the request was unsuccessful or has not yet been sent.|
||string||The response to the request as a DOM Document object, or null if the request was unsuccessful, has not yet been sent, or cannot be parsed as XML or HTML. The response is parsed as if it were a text/xml stream. When the responseType is set to "document" and the request has been made asynchronously, the response is parsed as a text/html stream.|
||number||The status of the response to the request. This is the HTTP result code (for example, status is 200 for a successful request).|
||string||The response string returned by the HTTP server. Unlike status, this includes the entire text of the response message ("200 OK", for example).|
||string||The number of milliseconds a request can take before automatically being terminated. A value of 0 (which is the default) means there is no timeout.|
||string||The upload process can be tracked by adding an event listener to upload.|
||string||Indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies or authorization headers. The default is false.|
- since version 9.0, where XMLHttpRequest is secured within cordova-plugin-bbd-base. It will be removed in future versions.
Aborts the request if it has already been sent.
Returns all the response headers as a string, or null if no response has been received. Note: For multipart requests, this returns the headers from the current part of the request, not from the original channel.
Returns the string containing the text of the specified header, or null if either the response has not yet been received or the header doesn't exist in the response.
open(method, url, async, user, password)
||string||The HTTP method to use, such as "GET", "POST", "PUT", "DELETE".|
||string||The URL to send the request to.|
||boolean||An optional boolean parameter, defaulting to true, indicating whether or not to perform the operation asynchronously. If this value is false, the send() method does not return until the response is received. If true, notification of a completed transaction is provided using event listeners. This must be true if the multipart attribute is true, or an exception will be thrown.|
||string||The optional user name to use for authentication purposes; by default, this is an empty string.|
||string||The optional password to use for authentication purposes; by default, this is an empty string.|
Overrides the MIME type returned by the server. This may be used, for example, to force a stream to be treated and parsed as text/xml, even if the server does not report it as such. This method must be called before send().
Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived. It takes optional parameter data. Optional parameter data can contain following types of data: ArrayBuffer Document DOMString FormData - object with key/value pairs that can be passed to send method as parameter. User can append file from GDFileSystem by passing valid fullPath to this file as key/value
Sets the value of an HTTP request header. You must call setRequestHeader() after open(), but before send(). If this method is called several times with the same header, the values are merged into one single request header.