r/node • u/RecognitionDecent266 • Feb 01 '22
Fetch API has landed into Node.js
https://github.com/nodejs/node/commit/6ec225392675c92b102d3caad02ee3a157c9d1b714
u/leeharris100 Feb 01 '22
I've been using got for so long that this doesn't really affect us at all
That being said, always nice to have a better standard library
3
u/cardyet Feb 02 '22
What made you preference Got over others?
2
u/leeharris100 Feb 02 '22
It's just so clean and simple for 99% of use cases but has the power there for more advanced stuff.
We actually use Nest for all of our new microservices and it has its own HTTP library. It is a wrapper around Axios that turns the response into an observable.
Personally I love observables and would prefer working with them most of the time, but it's conceptually MUCH harder for your average dev to understand compared to async/await.
While on the Nest HTTP page there was a header that said, "you can also use any http library like got or undici." Tried out got and loved it!
3
1
u/duckducklo May 02 '22
Do you use any of the advanced stuff got has that axios doesn't? Or if you don't know about axios, fetch doesn't?
5
1
1
1
1
1
62
u/Zipdox Feb 01 '22
Now we can finally ditch node-fetch, which I've wanted to do ever since it switched to ESM.