Comments (8)
You might want to checkout
https://github.com/matthew-andrews/isomorphic-fetch
This library is just going to be a standard polyfill implementation.
On Tue, Dec 23, 2014 at 8:34 PM Mark S. Everitt [email protected]
wrote:
It would be nice to be able to require fetch without it being appended to
window in a similar way to the es6-promise polyfill. If fetch can be
assigned to a variable, then this means that when a broken or otherwise
incompatible version of the fetch API become available in a browser, code
that uses fetch won't break.—
Reply to this email directly or view it on GitHub
#46.
from fetch.
That module just does the same as this one, but works in Node too. i.e. the behaviour in the browser is identical.
One last try to convince... doing this will allow your users to protect themselves from differences in implementation and changes in spec as browsers evolve.
Else, I can close (or please feel free to).
from fetch.
This is what I'm using at the moment. Seriously ugly, but has the behaviour I want: https://gist.github.com/qubyte/21cade5e28c924c48bc1
from fetch.
+1
from fetch.
I put that gist into a library. It has one potential showstopping problem though... It means that the brfs
transform must be used globally. https://github.com/qubyte/fetch-ponyfill
from fetch.
@qubyte you can specify transforms on a per-package basis (e.g. in your fetch-ponyfill package.json) to avoid the global-ness.
from fetch.
@domenic Wow. I really should have realised that. Thanks for the tip!
from fetch.
from fetch.
Related Issues (20)
- TDTcR8wBLadFYRekvobSSswHaj351EDNRT
- 📢 🎉 We’ve made some exciting improvements to our [REST API documentation](https://docs.github.com/en/rest) and we'd love to know what you think about the new layout! Let us know 👇 HOT 1
- Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the [contributing guidelines](https://github.com/github/docs/blob/main/CONTRIBUTING.md). HOT 1
- This repository is moving from the github org HOT 2
- Owner [email protected]
- 2018 license appachie com [email protected]
- Refused to get unsafe header "set-cookie"
- Owner
- changelog is missing for latest releases HOT 1
- File fetching broken since commit 0c1d2b9 HOT 3
- Create a Security Policy HOT 1
- Enable OpenSSF Scorecard Action HOT 3
- `Set-Cookie` headers should not be combined / Support `Headers.getSetCookie()` method
- Hash pin actions used on workflows and enable depenadabot
- code is working in chrome, not in firefox HOT 2
- Overriding feature detection HOT 2
- suggestion to use str.indexOf(searchString) === 0 for better compatibility HOT 2
- UMD Releases don't exist HOT 1
- Linkedin uses status code 999 which leads to RangeError HOT 4
- Response does not resolve until body fetched
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fetch.