isomorphic fetch support
zkat opened this issue · 3 comments
Would be nice to be able to use make-fetch-happen
in a browser.
It seems reasonably possible to nudge a few bits and pieces around in order to allow this to run on modern browsers. There's already https://npm.im/isomorphic-fetch too, although that uses a much older version of fetch than this would need.
As long as nothing requires core node modules or stuff like cacache
, we should be good.
Some of the node modules have automatic shims if you use something like webpack, too.
Eh. I'm gonna close this for now. I've no immediate need to make this isomorphic. It's meant as a QoL improvement thing for node devs anyway :)
We are wondering if we help you out here. Would you be interested in a PR adding browser support? :)
If you manage to pull it off, I'll take a PR as long as it doesn't create a bunch of special-case spaghetti. My main concern is that looking at the codebase, making this isomorphic would drop a LOT of features entirely (so it wouldn't be truly isomorphic), and also be pretty difficult since a lot of features lean on peculiarities with node-fetch-npm
.