XMLHttpRequest is discouraged
See original GitHub issueXMLHttpRequest is discouraged and will be more rare to be found in the new contexts like service worker.
Should axios
use fetch
when XMLHttpRequest
is not available?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:30
- Comments:15 (2 by maintainers)
Top Results From Across the Web
HTML in XMLHttpRequest - Web APIs | MDN
Chrome Edge
XMLHttpRequest Full support. Chrome1. Toggle history Full support. Edge12...
XMLHttpRequest() constructor Full support. Chrome1. Toggle history Full support. Edge12...
abort Full support. Chrome1. Toggle...
Read more >CORs does not get enabled when using XMLHttpRequest?
Attempting to make CORS request 'withCredentials' exist in xhr Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote ...
Read more >XMLHttpRequest - W3C
Extensions of the API defined by this specification are strongly discouraged. User agents, Working Groups and other interested parties ...
Read more >Source/core/xml/XMLHttpRequest.cpp - chromium/blink.git
// attempt to discourage synchronous XHR use. responseType is one such piece of functionality. // We'll only disable this functionality for HTTP(S) requests ......
Read more >Prototype v1.7.3 API documentation | Ajax section
asynchronous (Boolean; default true ): Determines whether XMLHttpRequest is used asynchronously or not. Synchronous usage is strongly discouraged — it halts ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please revisit this concept to implement a
fetch
adapter.I see some community work has been done here which could jump start the process. @jamesplease’s work above on fetch polyfill has been merged if that helps squelch outstanding concerns.
Axios is the suggested library everywhere you look (and for good reason!)
fetch
is needed for PWA+SW which is all the rage now. A compromise is highly desired by all, even if it’s a choice between features (e.g. ability to cancel vs support offline SW).Thank you for the essential module and consideration for the feature request.
@adzm I would be happy to be able to use axios in the service worker knowing that I would not be able to cancel rather than not to be able to use it at all. So in that case is not very versatile.
One advantage of using axios in the service worker is to reuse the client code instead of duplicating the flow for all the requests.