| java.lang.Object com.google.gwt.http.client.XMLHTTPRequest
XMLHTTPRequest | final class XMLHTTPRequest (Code) | | Utility class that serves as the one place where we interact with the
JavaScript XmlHttpRequest object.
|
Method Summary | |
native static void | abort(JavaScriptObject xmlHttpRequest) | native static String | getAllResponseHeaders(JavaScriptObject xmlHttpRequest) | native static String | getBrowserSpecificFailure(JavaScriptObject xmlHttpRequest) Tests if the JavaScript XmlHttpRequest.status property is
readable. | static Header[] | getHeaders(JavaScriptObject xmlHttpRequest) Returns an array of headers built by parsing the string of headers returned
by the JavaScript XmlHttpRequest object. | native static int | getReadyState(JavaScriptObject xmlHttpRequest) | native static String | getResponseHeader(JavaScriptObject xmlHttpRequest, String header) | native static String | getResponseText(JavaScriptObject xmlHttpRequest) | native static int | getStatusCode(JavaScriptObject xmlHttpRequest) | native static String | getStatusText(JavaScriptObject xmlHttpRequest) | static boolean | isResponseReady(JavaScriptObject xmlHttpRequest) | native static String | open(JavaScriptObject xmlHttpRequest, String httpMethod, String url, boolean async) Opens the request and catches any exceptions thrown. | native static String | open(JavaScriptObject xmlHttpRequest, String httpMethod, String url, boolean async, String user) Opens the request and catches any exceptions thrown. | native static String | open(JavaScriptObject xmlHttpRequest, String httpMethod, String url, boolean async, String user, String password) Opens the request and catches any exceptions thrown. | native static String | send(JavaScriptObject xmlHttpRequest, Request httpRequest, String requestData, RequestCallback callback) | native static String | setRequestHeader(JavaScriptObject xmlHttpRequest, String header, String value) |
LOADED | final public static int LOADED(Code) | | |
OPEN | final public static int OPEN(Code) | | |
RECEIVING | final public static int RECEIVING(Code) | | |
SENT | final public static int SENT(Code) | | |
UNITIALIZED | final public static int UNITIALIZED(Code) | | |
getBrowserSpecificFailure | native static String getBrowserSpecificFailure(JavaScriptObject xmlHttpRequest)(Code) | | Tests if the JavaScript XmlHttpRequest.status property is
readable. This can return failure in two different known scenarios:
- On Mozilla, after a network error, attempting to read the status code
results in an exception being thrown. See https://bugzilla.mozilla.org/show_bug.cgi?id=238559.
- On Safari, if the HTTP response does not include any response text.
See http://bugs.webkit.org/show_bug.cgi?id=3810.
Parameters: xmlHttpRequest - the JavaScript XmlHttpRequest objectto test a String message containing an error message if theXmlHttpRequest.status code is unreadable or null ifthe status code could be successfully read. |
getHeaders | static Header[] getHeaders(JavaScriptObject xmlHttpRequest)(Code) | | Returns an array of headers built by parsing the string of headers returned
by the JavaScript XmlHttpRequest object.
Parameters: xmlHttpRequest - array of Header items |
open | native static String open(JavaScriptObject xmlHttpRequest, String httpMethod, String url, boolean async)(Code) | | Opens the request and catches any exceptions thrown. If an exception is
caught, its string representation will be returned. This is the only signal
that an error has occurred.
Parameters: xmlHttpRequest - JavaScript XmlHttpRequest object Parameters: httpMethod - the method to use for open call Parameters: url - the URL to use for the open call Parameters: async - true if we should do an asynchronous open error message if an exception is thrown or null if there is none |
open | native static String open(JavaScriptObject xmlHttpRequest, String httpMethod, String url, boolean async, String user)(Code) | | Opens the request and catches any exceptions thrown. If an exception is
caught, its string representation will be returned. This is the only signal
that an error has occurred.
Parameters: xmlHttpRequest - JavaScript XmlHttpRequest object Parameters: httpMethod - the method to use for open call Parameters: url - the URL to use for the open call Parameters: async - true if we should do an asynchronous open Parameters: user - user to use in the URL error message if an exception is thrown or null if there is none |
open | native static String open(JavaScriptObject xmlHttpRequest, String httpMethod, String url, boolean async, String user, String password)(Code) | | Opens the request and catches any exceptions thrown. If an exception is
caught, its string representation will be returned. This is the only signal
that an error has occurred.
Parameters: xmlHttpRequest - JavaScript XmlHttpRequest object Parameters: httpMethod - the method to use for open call Parameters: url - the URL to use for the open call Parameters: async - true if we should do an asynchronous open Parameters: user - user to use in the URL Parameters: password - password to use in the URL error message if an exception is thrown or null if there is none |
|
|