| ▲ | afavour 8 hours ago | ||||||||||||||||||||||||||||||||||||||||||||||
Irony is that Node has no need for Axios, native fetch support has been there for years, so in terms of network requests it is batteries included. | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | pier25 6 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
People use axios or ky because with fetch you inevitably end up writing a small wrapper on top of it anyway. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | fishpen0 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
It doesn't matter. We pulled axios out of our codebase, but it still ends up in there as a child or peer from 40 other dependencies. Many from major vendors like datadog, slack, twilio, nx (in the gcs-cache extension), etc... | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | zadikian 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
Node fetch is relatively new. Wasn't marked stable until 2023, though I've used it since like 2018. | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | cyco130 6 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
I'm not sure fetch is a good server-side API. The typical fetch-based code snippet `fetch(API_URL).then(r => r.json())` has no response body size limit and can potentially bring down a server due to memory exhaustion if the endpoint at API_URL malfunctions for some reason. Fine in the browser but to me it should be a no-no on the server. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
| [deleted] | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | 7 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
| [deleted] | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | augusto-moura 6 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
It doesn't have a need _now_. Axios is more than 10 years old now, and even before axios other libraries did the same utility of making requests easier | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | MBCook 4 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||
Browsers too. It’s not needed anymore. | |||||||||||||||||||||||||||||||||||||||||||||||