Re:Request Node lib used by 48k modules is now deprecated
by 11235813213455 on Tuesday February 18, 2020 @01:00PM
(#22358337)
node-fetch above all, it's standard, and works in the browser https://github.com/node-fetch/node-fetch/blob/master/package...
Re:Request Node lib used by 48k modules is now deprecated
by rezonant on Tuesday February 18, 2020 @01:37PM
(#22358788)
This, 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
Re:Request Node lib used by 48k modules is now deprecated
by mekster on Tuesday February 18, 2020 @04:47PM
(#22360737)
I don't get why it doesn't support cookies but says to parse Set-Cookie header manually and implement it yourself.
Re:Request Node lib used by 48k modules is now deprecated
by 11235813213455 on Wednesday February 19, 2020 @01:50PM
(#22368691)
there's https://www.npmjs.com/package/fetch-cookie for node
// fetch with cookies:
const fetch = require('fetch-cookie/node-fetch')(require('node-fetch'));
And there are more modern alternatives like axios that do have this promises interface.