5 ms·
I think a comment in this thread should be visible to highlight any alternatives to request. I've been mentions to got (https://www.npmjs.com/package/got https
by VeejayRampay 8y ago
I think a comment in this thread should be visible to highlight any alternatives to request.
I've been mentions to got (https://www.npmjs.com/package/got https://www.npmjs.com/package/got), if anyone cares to point to other alternatives, that'd be nice, if only for educational purposes.
- skrebbel 8y agofetch() has an excellent API. It's native in browsers and it has a good Node implementation called node-fetch. https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWor...
- tlrobinson 8y agoI agree “fetch” is good enough in many cases. It doesn’t have all the conviences many clients do, but sometimes those can be added with a simple wrapper function tailored to your use case.
- ihuman 8y agoHow come fetch hasn't been integrated directly into node, like how its integrated directly into browsers?
- snek 8y agoit uses a lot of infrastructure that node doesn't have, like Request objects and Response objects and Body objects and mime checking etc etc list goes on. if someone feels like adding all those things to node and feels like arguing with our core maintainers about the duplication with http then maybe it will be added. https://github.com/nodejs/node/issues/19393 https://github.com/nodejs/node/issues/19393
- TomMarius 8y agoBecause Node.js already provides low level network access, while in browsers fetch() is the (second) lowest abstraction you can get to.
- bostonvaulter2 8y agoI don't think fetch provides progress indicators yet which can hamper its usage if you want good UX for certain operations like uploads.
- namanyayg 8y agoMikeal is working on `bent` [1] but I'm not sure I like how it results in a few lines extra over a `request` like library. Can anyone explain why this syntax? [1] https://github.com/mikeal/bent https://github.com/mikeal/bent
- 013a 8y agoAxios (https://www.npmjs.com/package/axios https://www.npmjs.com/package/axios) is probably one of the most popular.