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

com.vaadin.polymer.iron.IronRequestElement Maven / Gradle / Ivy

The 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;

import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;

/**
 * 

iron-request can be used to perform XMLHttpRequests.

*
<iron-request id="xhr"></iron-request>
 * ...
 * this.$.xhr.send({url: url, body: params});
 * 
 * 
*/ @JsType(isNative=true) public interface IronRequestElement extends HTMLElement { @JsOverlay public static final String TAG = "iron-request"; @JsOverlay public static final String SRC = "iron-ajax/iron-ajax.html"; /** *

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 Promise * */ @JsProperty JavaScriptObject 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 Promise * */ @JsProperty void setCompletes(JavaScriptObject value); /** *

Errored will be true if the browser fired an error event from the
XHR object (mainly network errors).

* * JavaScript Info: * @property errored * @type Boolean * */ @JsProperty boolean getErrored(); /** *

Errored will be true if the browser fired an error event from the
XHR object (mainly network errors).

* * JavaScript Info: * @property errored * @type Boolean * */ @JsProperty void setErrored(boolean value); /** *

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

* * JavaScript Info: * @property progress * @type Object * */ @JsProperty JavaScriptObject getProgress(); /** *

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

* * JavaScript Info: * @property progress * @type Object * */ @JsProperty void setProgress(JavaScriptObject value); /** *

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

* * JavaScript Info: * @property response * @type * * */ @JsProperty JavaScriptObject getResponse(); /** *

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

* * JavaScript Info: * @property response * @type * * */ @JsProperty void setResponse(JavaScriptObject value); /** *

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

* * JavaScript Info: * @property aborted * @type Boolean * */ @JsProperty boolean getAborted(); /** *

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

* * JavaScript Info: * @property aborted * @type Boolean * */ @JsProperty void setAborted(boolean value); /** *

A reference to the status code, if the xhr has completely resolved.

* * JavaScript Info: * @property status * @type Number * */ @JsProperty double getStatus(); /** *

A reference to the status code, if the xhr has completely resolved.

* * JavaScript Info: * @property status * @type Number * */ @JsProperty void setStatus(double value); /** *

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

* * JavaScript Info: * @property xhr * @type XMLHttpRequest * */ @JsProperty JavaScriptObject getXhr(); /** *

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

* * JavaScript Info: * @property xhr * @type XMLHttpRequest * */ @JsProperty void setXhr(JavaScriptObject value); /** *

TimedOut will be true if the XHR threw a timeout event.

* * JavaScript Info: * @property timedOut * @type Boolean * */ @JsProperty boolean getTimedOut(); /** *

TimedOut will be true if the XHR threw a timeout event.

* * JavaScript Info: * @property timedOut * @type Boolean * */ @JsProperty void setTimedOut(boolean value); /** *

A reference to the status text, if the xhr has completely resolved.

* * JavaScript Info: * @property statusText * @type String * */ @JsProperty String getStatusText(); /** *

A reference to the status text, if the xhr has completely resolved.

* * JavaScript Info: * @property statusText * @type String * */ @JsProperty void setStatusText(String value); /** *

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

*

The handling of the body parameter will vary based on the Content-Type
header. See the docs for iron-ajax’s body param for details.

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

Aborts the request.

* * JavaScript Info: * @method abort * * */ void abort(); /** *

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 * * @return {JavaScriptObject} */ JavaScriptObject parseResponse(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy