public class Xhr extends Object
XMLHttpRequest.
Copied from the GWT project to make get/post return the XmlHttpRequest| Modifier and Type | Class and Description |
|---|---|
static interface |
Xhr.Callback
Notifies when an XHR successfully completes, or errors out.
|
| Constructor and Description |
|---|
Xhr() |
| Modifier and Type | Method and Description |
|---|---|
static com.google.gwt.xhr.client.XMLHttpRequest |
get(String url,
Xhr.Callback callback)
Send a GET request to the
url and dispatch updates to the
callback. |
static com.google.gwt.xhr.client.XMLHttpRequest |
get(elemental.html.Window window,
String url,
Xhr.Callback callback)
Send a GET request to the
url and dispatch updates to the
callback. |
static com.google.gwt.xhr.client.XMLHttpRequest |
head(String url,
Xhr.Callback callback)
Send a HEAD request to the
url and dispatch updates to the
callback. |
static com.google.gwt.xhr.client.XMLHttpRequest |
head(elemental.html.Window window,
String url,
Xhr.Callback callback)
Send a HEAD request to the
url and dispatch updates to the
callback. |
static com.google.gwt.xhr.client.XMLHttpRequest |
post(String url,
String requestData,
String contentType,
Xhr.Callback callback)
Send a POST request to the
url and dispatch updates to the
callback. |
static com.google.gwt.xhr.client.XMLHttpRequest |
post(elemental.html.Window window,
String url,
String requestData,
String contentType,
Xhr.Callback callback)
Send a POST request to the
url and dispatch updates to the
callback. |
public static com.google.gwt.xhr.client.XMLHttpRequest get(String url, Xhr.Callback callback)
url and dispatch updates to the
callback.url - the URLcallback - the callback to be notifiedpublic static com.google.gwt.xhr.client.XMLHttpRequest get(elemental.html.Window window,
String url,
Xhr.Callback callback)
url and dispatch updates to the
callback.window - the window object used to access the XMLHttpRequest
constructorurl - the URLcallback - the callback to be notifiedpublic static com.google.gwt.xhr.client.XMLHttpRequest head(String url, Xhr.Callback callback)
url and dispatch updates to the
callback.url - the URLcallback - the callback to be notifiedpublic static com.google.gwt.xhr.client.XMLHttpRequest head(elemental.html.Window window,
String url,
Xhr.Callback callback)
url and dispatch updates to the
callback.window - the window object used to access the XMLHttpRequest
constructorurl - the URLcallback - the callback to be notifiedpublic static com.google.gwt.xhr.client.XMLHttpRequest post(String url, String requestData, String contentType, Xhr.Callback callback)
url and dispatch updates to the
callback.url - the URLrequestData - the data to be passed to XMLHttpRequest.sendcontentType - a value for the Content-Type HTTP headercallback - the callback to notifypublic static com.google.gwt.xhr.client.XMLHttpRequest post(elemental.html.Window window,
String url,
String requestData,
String contentType,
Xhr.Callback callback)
url and dispatch updates to the
callback.window - the window object used to access the XMLHttpRequest
constructorurl - the URLrequestData - the data to be passed to XMLHttpRequest.sendcontentType - a value for the Content-Type HTTP headercallback - the callback to notifyCopyright © 2000–2026 Vaadin Ltd. All rights reserved.