XMLHttpRequest

Module: JavaScript DOM API

#include <XMLHttpRequest.idl>

Inherits from XMLHttpRequestEventTarget, EventTarget

Public Functions

Name
XMLHttpRequestXMLHttpRequest()
voidopen(DOMString method, DOMString url, optional boolean async, optional DOMString username, optional DOMString password)
voidsetRequestHeader(DOMString name, DOMString value)
voidsend(optional DOMString? data)
voidabort()
DOMStringgetResponseHeader(DOMString name)
DOMStringgetAllResponseHeaders()
voidoverrideMimeType(DOMString mime)
ArrayBufferresponseArrayBuffer()
BlobresponseBlob()

Public Attributes

Name
const unsigned shortUNSENT
const unsigned shortOPENED
const unsigned shortHEADERS_RECEIVED
const unsigned shortLOADING
const unsigned shortDONE
readonly attribute unsigned shortreadyState
attribute unsigned longtimeout
attribute booleanwithCredentials
readonly attribute USVStringresponseURL
readonly attribute unsigned shortstatus
readonly attribute ByteStringstatusText
attribute DOMStringresponseType
readonly attribute DOMStringresponseText
readonly attribute anyresponse
attribute EventSetterreadystatechange
attribute EventSetterloadstart
attribute EventSetterprogress
attribute EventSetterabort
attribute EventSettererror
attribute EventSetterload
attribute EventSettertimeout
attribute EventSetterloadend

Additional inherited members

Public Functions inherited from EventTarget

Name
voidaddEventListener(DOMInternedString type, EventListener listener, optional boolean useCapture)
voidremoveEventListener(DOMInternedString type, EventListener listener, optional boolean useCapture)
booleandispatchEvent(Event event)

Public Functions Documentation

function XMLHttpRequest

XMLHttpRequest XMLHttpRequest()

function open

void open(
    DOMString method,
    DOMString url,
    optional boolean async,
    optional DOMString username,
    optional DOMString password
)

function setRequestHeader

void setRequestHeader(
    DOMString name,
    DOMString value
)

function send

void send(
    optional DOMString? data
)

function abort

void abort()

function getResponseHeader

DOMString getResponseHeader(
    DOMString name
)

function getAllResponseHeaders

DOMString getAllResponseHeaders()

function overrideMimeType

void overrideMimeType(
    DOMString mime
)

function responseArrayBuffer

ArrayBuffer responseArrayBuffer()

function responseBlob

Blob responseBlob()

Public Attributes Documentation

variable UNSENT

const unsigned short UNSENT = 0;

variable OPENED

const unsigned short OPENED = 1;

variable HEADERS_RECEIVED

const unsigned short HEADERS_RECEIVED = 2;

variable LOADING

const unsigned short LOADING = 3;

variable DONE

const unsigned short DONE = 4;

variable readyState

readonly attribute unsigned short readyState;

variable timeout

attribute unsigned long timeout;

variable withCredentials

attribute boolean withCredentials;

variable responseURL

readonly attribute USVString responseURL;

variable status

readonly attribute unsigned short status;

variable statusText

readonly attribute ByteString statusText;

variable responseType

attribute DOMString responseType;

variable responseText

readonly attribute DOMString responseText;

variable response

readonly attribute any response;

variable readystatechange

attribute EventSetter readystatechange;

variable loadstart

attribute EventSetter loadstart;

variable progress

attribute EventSetter progress;

variable abort

attribute EventSetter abort;

variable error

attribute EventSetter error;

variable load

attribute EventSetter load;

variable timeout

attribute EventSetter timeout;

variable loadend

attribute EventSetter loadend;