3 ms·
It is slightly archaic in that it mostly uses a callback convention, when most of the node community has moved on to promises. And there are more modern altern
by outside1234 7y ago
It is slightly archaic in that it mostly uses a callback convention, when most of the node community has moved on to promises.
And there are more modern alternatives like axios that do have this promises interface.
- 11235813213455 7y agonode-fetch above all, it's standard, and works in the browser https://github.com/node-fetch/node-fetch/blob/master/package.json#L6 https://github.com/node-fetch/node-fetch/blob/master/package...
- rezonant 7y agoThis, I use it for all Node.js backend requests. Personally I think we need to move to isomorphic solutions and work to unify backend and frontend JS development as much as we can. This one's a no-brainer
- mekster 7y agoI don't get why it doesn't support cookies but says to parse Set-Cookie header manually and implement it yourself.
- 11235813213455 7y agothere's https://www.npmjs.com/package/fetch-cookie https://www.npmjs.com/package/fetch-cookie for node // fetch with cookies: const fetch = require('fetch-cookie/node-fetch')(require('node-fetch'));