@mstyk/iron-ajax

1.1.3 • Public • Published

Build Status

Demo and API Docs

##<iron-ajax>

The iron-ajax element exposes network request functionality.

<iron-ajax
    auto
    url="http://gdata.youtube.com/feeds/api/videos/"
    params='{"alt":"json", "q":"chrome"}'
    handle-as="json"
    on-response="handleResponse"
    debounce-duration="300"></iron-ajax>

With auto set to true, the element performs a request whenever its url, params or body properties are changed. Automatically generated requests will be debounced in the case that multiple attributes are changed sequentially.

Note: The params attribute must be double quoted JSON.

You can trigger a request explicitly by calling generateRequest on the element.

##<iron-request>

iron-request can be used to perform XMLHttpRequests.

<iron-request id="xhr"></iron-request>
...
this.$.xhr.send({url: url, params: params});

Readme

Keywords

none

Package Sidebar

Install

npm i @mstyk/iron-ajax

Weekly Downloads

1

Version

1.1.3

License

BSD-3-Clause

Unpacked Size

74.4 kB

Total Files

13

Last publish

Collaborators

  • stykmartin