@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="XMLHttpRequest")
public class XMLHttpRequest
extends XMLHttpRequestEventTarget
| Modifier and Type | Field and Description |
|---|---|
static int |
DONE |
static int |
HEADERS_RECEIVED |
static int |
LOADING |
EventHandler |
onreadystatechange
An EventHandler that is called whenever the readyState attribute changes.
|
static int |
OPENED |
java.lang.String |
responseType
The XMLHttpRequest property responseType is an enumerated string value specifying the type of data contained in the response.
|
int |
timeout
The XMLHttpRequest.timeout property is an unsigned long representing the number of milliseconds a request can take before automatically being terminated.
|
static int |
UNSENT |
boolean |
withCredentials
The XMLHttpRequest.withCredentials property is a Boolean that indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates.
|
onabort, onerror, onload, onloadend, onloadstart, onprogress, ontimeout| Constructor and Description |
|---|
XMLHttpRequest()
The XMLHttpRequest() constructor creates a new XMLHttpRequest.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
The XMLHttpRequest.abort() method aborts the request if it has already been sent.
|
void |
addAbortListener(ProgressEventListener callback) |
void |
addAbortListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addAbortListener(ProgressEventListener callback,
boolean useCapture) |
void |
addErrorListener(ProgressEventListener callback) |
void |
addErrorListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addErrorListener(ProgressEventListener callback,
boolean useCapture) |
void |
addLoadendListener(ProgressEventListener callback) |
void |
addLoadendListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addLoadendListener(ProgressEventListener callback,
boolean useCapture) |
void |
addLoadListener(ProgressEventListener callback) |
void |
addLoadListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addLoadListener(ProgressEventListener callback,
boolean useCapture) |
void |
addLoadstartListener(ProgressEventListener callback) |
void |
addLoadstartListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addLoadstartListener(ProgressEventListener callback,
boolean useCapture) |
void |
addProgressListener(ProgressEventListener callback) |
void |
addProgressListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addProgressListener(ProgressEventListener callback,
boolean useCapture) |
void |
addTimeoutListener(ProgressEventListener callback) |
void |
addTimeoutListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addTimeoutListener(ProgressEventListener callback,
boolean useCapture) |
java.lang.String |
getAllResponseHeaders()
The XMLHttpRequest method getAllResponseHeaders() returns all the response headers, separated by CRLF, as a string, or returns null if no response has been received.
|
java.lang.String |
getResponseHeader(java.lang.String name)
The XMLHttpRequest method getResponseHeader() returns the string containing the text of a particular header's value.
|
void |
open(java.lang.String method,
java.lang.String url)
The XMLHttpRequest method open() initializes a newly-created request, or re-initializes an existing one.
|
void |
open(java.lang.String method,
java.lang.String url,
boolean async)
The XMLHttpRequest method open() initializes a newly-created request, or re-initializes an existing one.
|
void |
open(java.lang.String method,
java.lang.String url,
boolean async,
java.lang.String username)
The XMLHttpRequest method open() initializes a newly-created request, or re-initializes an existing one.
|
void |
open(java.lang.String method,
java.lang.String url,
boolean async,
java.lang.String username,
java.lang.String password)
The XMLHttpRequest method open() initializes a newly-created request, or re-initializes an existing one.
|
void |
overrideMimeType(java.lang.String mime)
The XMLHttpRequest method overrideMimeType() specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request.
|
int |
readyState()
The XMLHttpRequest.readyState property returns the state an XMLHttpRequest client is in.
|
void |
removeAbortListener(ProgressEventListener callback) |
void |
removeAbortListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeAbortListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeErrorListener(ProgressEventListener callback) |
void |
removeErrorListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeErrorListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeLoadendListener(ProgressEventListener callback) |
void |
removeLoadendListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeLoadendListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeLoadListener(ProgressEventListener callback) |
void |
removeLoadListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeLoadListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeLoadstartListener(ProgressEventListener callback) |
void |
removeLoadstartListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeLoadstartListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeProgressListener(ProgressEventListener callback) |
void |
removeProgressListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeProgressListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeTimeoutListener(ProgressEventListener callback) |
void |
removeTimeoutListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeTimeoutListener(ProgressEventListener callback,
EventListenerOptions options) |
jsinterop.base.Any |
response()
The XMLHttpRequest response property returns the response's body content as an ArrayBuffer, Blob, Document, JavaScript Object, or DOMString, depending on the value of the request's responseType property.
|
java.lang.String |
responseText()
The read-only XMLHttpRequest property responseText returns the text received from a server following a request being sent.
|
java.lang.String |
responseURL()
The read-only XMLHttpRequest.responseURL property returns the serialized URL of the response or the empty string if the URL is null.
|
Document |
responseXML()
The XMLHttpRequest.responseXML read-only property returns a Document containing the HTML or XML retrieved by the request; or null if the request was unsuccessful, has not yet been sent, or if the data can't be parsed as XML or HTML.
|
void |
send()
The XMLHttpRequest method send() sends the request to the server.
|
void |
send(Blob body)
The XMLHttpRequest method send() sends the request to the server.
|
void |
send(BufferSource body)
The XMLHttpRequest method send() sends the request to the server.
|
void |
send(Document body)
The XMLHttpRequest method send() sends the request to the server.
|
void |
send(FormData body)
The XMLHttpRequest method send() sends the request to the server.
|
void |
send(java.lang.String body)
The XMLHttpRequest method send() sends the request to the server.
|
void |
send(URLSearchParams body)
The XMLHttpRequest method send() sends the request to the server.
|
void |
send(XMLHttpRequestBodyInit body)
The XMLHttpRequest method send() sends the request to the server.
|
void |
setRequestHeader(java.lang.String name,
java.lang.String value)
The XMLHttpRequest method setRequestHeader() sets the value of an HTTP request header.
|
int |
status()
The read-only XMLHttpRequest.status property returns the numerical HTTP status code of the XMLHttpRequest's response.
|
java.lang.String |
statusText()
The read-only XMLHttpRequest.statusText property returns a DOMString containing the response's status message as returned by the HTTP server.
|
XMLHttpRequestUpload |
upload()
The XMLHttpRequest upload property returns an XMLHttpRequestUpload object that can be observed to monitor an upload's progress.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListener@JsOverlay public static final int DONE
@JsOverlay public static final int HEADERS_RECEIVED
@JsOverlay public static final int LOADING
@JsOverlay public static final int OPENED
@JsOverlay public static final int UNSENT
@Nullable public EventHandler onreadystatechange
@Nonnull @XMLHttpRequestResponseType public java.lang.String responseType
public int timeout
public boolean withCredentials
public XMLHttpRequest()
@JsProperty(name="readyState") @XMLHttpRequestReadyState public int readyState()
@JsProperty(name="response") @Nullable public jsinterop.base.Any response()
@JsProperty(name="responseText") @Nonnull public java.lang.String responseText()
@JsProperty(name="responseURL") @Nonnull public java.lang.String responseURL()
@JsProperty(name="responseXML") @Nullable public Document responseXML()
@JsProperty(name="status") public int status()
@JsProperty(name="statusText") @Nonnull public java.lang.String statusText()
@JsProperty(name="upload") @Nonnull public XMLHttpRequestUpload upload()
public void abort()
@Nonnull public java.lang.String getAllResponseHeaders()
@Nullable
public java.lang.String getResponseHeader(@Nonnull
java.lang.String name)
public void open(@Nonnull
java.lang.String method,
@Nonnull
java.lang.String url)
public void open(@Nonnull
java.lang.String method,
@Nonnull
java.lang.String url,
boolean async,
@Nullable
java.lang.String username,
@Nullable
java.lang.String password)
public void open(@Nonnull
java.lang.String method,
@Nonnull
java.lang.String url,
boolean async,
@Nullable
java.lang.String username)
public void open(@Nonnull
java.lang.String method,
@Nonnull
java.lang.String url,
boolean async)
public void overrideMimeType(@Nonnull
java.lang.String mime)
public void send(@Nonnull
Document body)
public void send(@Nonnull
XMLHttpRequestBodyInit body)
public void send(@Nonnull
Blob body)
public void send(@Nonnull
BufferSource body)
public void send(@Nonnull
FormData body)
public void send(@Nonnull
URLSearchParams body)
public void send(@Nonnull
java.lang.String body)
public void send()
public void setRequestHeader(@Nonnull
java.lang.String name,
@Nonnull
java.lang.String value)
@JsOverlay
public final void addAbortListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addAbortListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addAbortListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeAbortListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeAbortListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeAbortListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addErrorListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addErrorListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addErrorListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeErrorListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeErrorListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeErrorListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addLoadListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addLoadListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addLoadListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeLoadListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeLoadListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeLoadListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addLoadendListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addLoadendListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addLoadendListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeLoadendListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeLoadendListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeLoadendListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addLoadstartListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addLoadstartListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addLoadstartListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeLoadstartListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeLoadstartListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeLoadstartListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addProgressListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addProgressListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addProgressListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeProgressListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeProgressListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeProgressListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addTimeoutListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addTimeoutListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addTimeoutListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeTimeoutListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeTimeoutListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeTimeoutListener(@Nonnull
ProgressEventListener callback)