3 ms·
It's probably a good time to start looking at using the Fetch API [1] for making AJAX requests instead of using jQuery or Backbone (or even XMLHttpRequest). Sup
by iamjs 11y ago
It's probably a good time to start looking at using the Fetch API [1] for making AJAX requests instead of using jQuery or Backbone (or even XMLHttpRequest). Support seems to be growing quickly and Github's polyfill [2] can help cover the gaps.
[1] https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
[2] https://github.com/github/fetch https://github.com/github/fetch
- tracker1 11y agoAgreed... I really have come to like fetch, though I usually wrap it in a couple functions for my most common use cases... since some of the options are a little tedious to specify over and over again... such as `postJson(url, data)` which will post the data as json, and resolve the json response with some extra error handling. It works well, and combined with babel for async/await, the workflow is pretty smooth as well.
- PhrosTT 11y agoYes, EXCEPT, As of now fetch has no abort() support. Having 50 in flight autocomplete requests going in parallel is not cool.