interface XMLHttpRequest : XMLHttpRequestEventTarget {

    constructor();

    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;
    readonly attribute unsigned short status;
    readonly attribute DOMString responseText;

    undefined open(DOMString method, DOMString url);
    undefined setRequestHeader(DOMString name, DOMString value);
    undefined send(optional USVString body = {});

    ByteString? getResponseHeader(ByteString name);
    ByteString getAllResponseHeaders();

    attribute EventHandler onreadystatechange;

};
