window.fetch polyfill
fetch
Our great sponsors
window.fetch polyfill | fetch | |
---|---|---|
25 | 4 | |
25,798 | 58 | |
0.0% | - | |
7.9 | 6.7 | |
4 days ago | 9 months ago | |
JavaScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
window.fetch polyfill
-
How do I detect requests initiated by the new fetch standard? How should I detect an AJAX request in general?
Most js libraries use XMLHttpRequest and so provide HTTP_X_REQUESTED_WITH: XMLHttpRequest, but neither Chrome's implementation nor Github's polyfill of the new fetch uses a similar header. So how can one detect that the request is AJAX?
-
Stop polyfilling fetch in your npm package
In this case, Github offers a great fetch polyfill for browsers: https://github.com/github/fetch
-
jQuery 3.6.2 Released
You can polyfill fetch() if that's a concern:
- The impact of removing jQuery on our web performance
- fetch patch request is not allowed
- What is the difference between isomorphic-fetch and fetch?
-
Fetch: reject promise and catch the error if status is not OK?
I'm using this fetch polyfill in Redux with redux-promise-middleware.
-
Upload progress indicators for fetch?
I'm struggling to find documentation or examples of implementing an upload progress indicator using fetch.
-
jQuery is (still) used on 80%+ of websites
I would just polyfill fetch if that were the case.
- The real reason behind why I switched
fetch
-
Modern API data-fetching methods in React
I've written a very small fetch wrapper that simplifies the syntax: https://github.com/tkrotoff/fetch
-
I wrote a small Fetch API wrapper, comes with testing utilities
See https://github.com/tkrotoff/fetch/tree/file-organization/src
The cool part is that it comes with testing utilities that make mocking easier: https://github.com/tkrotoff/fetch#testing
What are some alternatives?
axios - Promise based HTTP client for the browser and node.js
ky - 🌳 Tiny & elegant JavaScript HTTP client based on the browser Fetch API
node-fetch - A light-weight module that brings the Fetch API to Node.js
request - 🏊🏾 Simplified HTTP request client.
superagent - Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
Nock - HTTP server mocking and expectations library for Node.js
undici - An HTTP/1.1 client, written from scratch for Node.js
download - Download and extract files
hyperscript - Create HyperText with JavaScript.
cacheable-request - Wrap native HTTP requests with RFC compliant cache support
isomorphic-fetch - Isomorphic WHATWG Fetch API, for Node & Browserify
node-libcurl - libcurl bindings for Node.js