public class JQueryXHR extends XMLHttpRequest
Objs.Constructor<T extends Objs>, Objs.Property<T>
Modifier and Type | Field and Description |
---|---|
Objs.Property<Object> |
responseJSON
Property containing the parsed response if the response Content-Type is json
|
DONE, HEADERS_RECEIVED, LOADING, msCaching, onreadystatechange, OPENED, readyState, response, responseBody, responseText, responseType, responseXML, status, statusText, timeout, UNSENT, upload, withCredentials
Modifier | Constructor and Description |
---|---|
protected |
JQueryXHR(Objs.Constructor<?> c,
Object js) |
Modifier and Type | Method and Description |
---|---|
static JQueryXHR |
$as(Object obj) |
void |
abort()
Cancel the request.
|
void |
abort(String statusText)
Cancel the request.
|
void |
error(JQueryXHR xhr,
String textStatus,
String errorThrown)
A function to be called if the request fails.
|
void |
overrideMimeType(String mimeType)
The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header.
|
<R> JQueryPromise<R> |
then(Function.A3<? super Object,? super String,? super JQueryXHR,? extends R> doneCallback)
Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated.
|
<R> JQueryPromise<R> |
then(Function.A3<? super Object,? super String,? super JQueryXHR,? extends R> doneCallback,
Function.A3<? super JQueryXHR,? super String,? super Object,? extends Void> failCallback)
Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated.
|
addEventListener, addEventListener, addEventListener, addEventListener, addEventListener, addEventListener, DONE, getAllResponseHeaders, getResponseHeader, HEADERS_RECEIVED, LOADING, msCaching, msCachingEnabled, onreadystatechange, open, open, open, open, OPENED, readyState, responseText, responseType, send, send, send, send, setRequestHeader, status, statusText, timeout, UNSENT, upload, withCredentials
dispatchEvent, removeEventListener, removeEventListener, removeEventListener, removeEventListener
$as, $cast, $delete, $get, $js, $set, create, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, hasOwnProperty, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, newObject, newObject, preventExtensions, propertyIsEnumerable, seal, toLocaleString, toString, valueOf
public Objs.Property<Object> responseJSON
protected JQueryXHR(Objs.Constructor<?> c, Object js)
public void abort(String statusText)
statusText
- A string passed as the textStatus parameter for the done callback. Default value: "canceled"public void abort()
abort
in class XMLHttpRequest
statusText
- A string passed as the textStatus parameter for the done callback. Default value: "canceled"public void error(JQueryXHR xhr, String textStatus, String errorThrown)
public void overrideMimeType(String mimeType)
overrideMimeType
in class XMLHttpRequest
public <R> JQueryPromise<R> then(Function.A3<? super Object,? super String,? super JQueryXHR,? extends R> doneCallback, Function.A3<? super JQueryXHR,? super String,? super Object,? extends Void> failCallback)
public <R> JQueryPromise<R> then(Function.A3<? super Object,? super String,? super JQueryXHR,? extends R> doneCallback)
Copyright © 2018. All rights reserved.