XMLHttpRequest.idl [plain text]
typedef (Blob or BufferSource or DOMFormData or USVString) BodyInit;
enum XMLHttpRequestResponseType {
"",
"arraybuffer",
"blob",
"document",
"json",
"text"
};
[
ActiveDOMObject,
Constructor,
ConstructorCallWith=ScriptExecutionContext,
ExportMacro=WEBCORE_EXPORT,
Exposed=(Window,DedicatedWorker),
JSCustomMarkFunction,
JSGenerateToJSObject,
JSGenerateToNativeObject,
] interface XMLHttpRequest : XMLHttpRequestEventTarget {
attribute EventHandler onreadystatechange;
const unsigned short UNSENT = 0;
const unsigned short OPENED = 1;
const unsigned short HEADERS_RECEIVED = 2;
const unsigned short LOADING = 3;
const unsigned short DONE = 4;
readonly attribute unsigned short readyState;
[MayThrowException] void open(ByteString method, DOMString url); [MayThrowException] void open(ByteString method, DOMString url, boolean async, optional DOMString? user = null, optional DOMString? password = null); [MayThrowException] void setRequestHeader(ByteString header, ByteString value);
attribute unsigned long timeout;
attribute boolean withCredentials;
readonly attribute XMLHttpRequestUpload upload;
[MayThrowException] void send(optional (Document or BodyInit)? body = null);
void abort();
readonly attribute USVString responseURL;
readonly attribute unsigned short status;
readonly attribute ByteString statusText;
ByteString? getResponseHeader(ByteString name);
ByteString getAllResponseHeaders();
[MayThrowException] void overrideMimeType(DOMString mime);
attribute XMLHttpRequestResponseType responseType;
[CachedAttribute, CustomGetter] readonly attribute any response;
readonly attribute USVString responseText;
[Exposed=Window] readonly attribute Document? responseXML;
};