PolymerElements / iron-ajax

Easily make ajax requests
https://www.webcomponents.org/element/PolymerElements/iron-ajax
127 stars 113 forks source link

Request: Switch from using 'xmlhttp' to 'Fetch API' #217

Open safizn opened 8 years ago

safizn commented 8 years ago

Fetch is better is a better API, and I like to see how you would implement it instead of the olderxmlhttp requests.

rictic commented 8 years ago

Agreed, we're actively considering this.

Hunsin commented 8 years ago

Is there any news about this issue?

JosefJezek commented 7 years ago

@rictic ?

rictic commented 7 years ago

There are a few concerns here. Fetch is awesome, but not supported on all browsers that we support, so we'd have to ship a polyfill. Such a polyfill would make the element behave more predictably, but it would add some weight too, so it's not an obvious yes or no call to make.

I don't think we'll make any major changes like that at least until after Polymer 2.0 has landed and stabilized a bit.

jay8t6 commented 7 years ago

@rictic can't we make use of an existing polyfill like this? https://github.com/github/fetch

rictic commented 7 years ago

Yeah, it's not a matter of writing the polyfill, just whether it's worth the weight of the code.

AshGrowem commented 6 years ago

Why not both? Keep iron-ajax and start a new experimental iron-fetch element that implements Fetch API and optionally loads the fetch polyfill (perhaps as an attribute or extra html import).