All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.polymer.iron.widget.IronRequest Maven / Gradle / Ivy

There is a newer version: 1.9.3.1
Show newest version
/*
 * This code was generated with Vaadin Web Component GWT API Generator, 
 * from iron-ajax project by The Polymer Authors
 * that is licensed with http://polymer.github.io/LICENSE.txt license.
 */
package com.vaadin.polymer.iron.widget;

import com.vaadin.polymer.iron.element.*;

import com.vaadin.polymer.PolymerWidget;
import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.core.client.JavaScriptObject;

/**
 * 

iron-request can be used to perform XMLHttpRequests.

*
<iron-request id="xhr"></iron-request>
 * ...
 * this.$.xhr.send({url: url, params: params});
 * 
 * 
*/ public class IronRequest extends PolymerWidget { /** * Default Constructor. */ public IronRequest() { this(""); } /** * Constructor used by UIBinder to create widgets with content. */ public IronRequest(String html) { super(IronRequestElement.TAG, IronRequestElement.SRC, html); } /** * Gets a handle to the Polymer object's underlying DOM element. */ public IronRequestElement getPolymerElement() { return (IronRequestElement) getElement(); } /** *

Aborts the request.

* * JavaScript Info: * @method abort * */ public void abort() { getPolymerElement().abort(); } /** *

Aborted will be true if an abort of the request is attempted.

* * JavaScript Info: * @property aborted * @type Boolean * */ public boolean getAborted(){ return getPolymerElement().getAborted(); } /** *

Aborted will be true if an abort of the request is attempted.

* * JavaScript Info: * @property aborted * @type Boolean * */ public void setAborted(boolean value) { getPolymerElement().setAborted(value); } /** *

A promise that resolves when the xhr response comes back, or rejects
if there is an error before the xhr completes.

* * JavaScript Info: * @property completes * @type Object * */ public JavaScriptObject getCompletes(){ return getPolymerElement().getCompletes(); } /** *

A promise that resolves when the xhr response comes back, or rejects
if there is an error before the xhr completes.

* * JavaScript Info: * @property completes * @type Object * */ public void setCompletes(JavaScriptObject value) { getPolymerElement().setCompletes(value); } /** *

A promise that resolves when the xhr response comes back, or rejects
if there is an error before the xhr completes.

* * JavaScript Info: * @attribute completes * */ public void setCompletes(String value) { getPolymerElement().setAttribute("completes", value); } /** *

Attempts to parse the response body of the XHR. If parsing succeeds,
the value returned will be deserialized based on the responseType
set on the XHR.

* * JavaScript Info: * @method parseResponse * */ public void parseResponse() { getPolymerElement().parseResponse(); } /** *

An object that contains progress information emitted by the XHR if
available.

* * JavaScript Info: * @property progress * @type Object * */ public JavaScriptObject getProgress(){ return getPolymerElement().getProgress(); } /** *

An object that contains progress information emitted by the XHR if
available.

* * JavaScript Info: * @property progress * @type Object * */ public void setProgress(JavaScriptObject value) { getPolymerElement().setProgress(value); } /** *

An object that contains progress information emitted by the XHR if
available.

* * JavaScript Info: * @attribute progress * */ public void setProgress(String value) { getPolymerElement().setAttribute("progress", value); } /** *

A reference to the parsed response body, if the xhr has completely
resolved.

* * JavaScript Info: * @property response * @type * * */ public JavaScriptObject getResponse(){ return getPolymerElement().getResponse(); } /** *

A reference to the parsed response body, if the xhr has completely
resolved.

* * JavaScript Info: * @property response * @type * * */ public void setResponse(JavaScriptObject value) { getPolymerElement().setResponse(value); } /** *

A reference to the parsed response body, if the xhr has completely
resolved.

* * JavaScript Info: * @attribute response * */ public void setResponse(String value) { getPolymerElement().setAttribute("response", value); } /** *

Sends an HTTP request to the server and returns the XHR object.

* * JavaScript Info: * @method send * @param {{url: string, method: (string|undefined), async: (boolean|undefined), body: (ArrayBuffer|ArrayBufferView|Blob|Document|FormData|null|string|undefined), headers: (Object|undefined), handleAs: (string|undefined), withCredentials: (boolean|undefined)}} options * */ public void send(JavaScriptObject options) { getPolymerElement().send(options); } /** *

Succeeded is true if the request succeeded. The request succeeded if the
status code is greater-than-or-equal-to 200, and less-than 300. Also,
the status code 0 is accepted as a success even though the outcome may
be ambiguous.

* * JavaScript Info: * @method succeeded * */ public void succeeded() { getPolymerElement().succeeded(); } /** *

A reference to the XMLHttpRequest instance used to generate the
network request.

* * JavaScript Info: * @property xhr * @type Object * */ public JavaScriptObject getXhr(){ return getPolymerElement().getXhr(); } /** *

A reference to the XMLHttpRequest instance used to generate the
network request.

* * JavaScript Info: * @property xhr * @type Object * */ public void setXhr(JavaScriptObject value) { getPolymerElement().setXhr(value); } /** *

A reference to the XMLHttpRequest instance used to generate the
network request.

* * JavaScript Info: * @attribute xhr * */ public void setXhr(String value) { getPolymerElement().setAttribute("xhr", value); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy