Re:Node.js HTTP client axios pushes broken update breaking p...
by real_kaipi on Friday October 07, 2022 @09:20AM
(#33120878)
what are good alternatives?
[ Parent
| on HN ]
Re:Node.js HTTP client axios pushes broken update breaking p...
by peanut_worm on Friday October 07, 2022 @09:33AM
(#33121035)
fetch?
Re:Node.js HTTP client axios pushes broken update breaking p...
by sandruso on Friday October 07, 2022 @09:49AM
(#33121272)
Fetch is low level. Axios is battery-included
Re:Node.js HTTP client axios pushes broken update breaking p...
by yrds96 on Friday October 07, 2022 @10:57AM
(#33122220)
Low level? Really? Can you point something that is achieved on axios with few lines of code that fetch couldn't do it with few lines of code too? I can't considerate fecth.get().then(res => res.json().then(data => /.../)) A Low level thing.
Re:Node.js HTTP client axios pushes broken update breaking p...
by eurasiantiger on Sunday October 09, 2022 @04:07AM
(#33139025)
Even if some difference actually matters (e.g. setting a timeout), it would be wise to wrap axios or fetch in a custom function, which obviates the need to use either for most developers using the codebase.
Re:Node.js HTTP client axios pushes broken update breaking p...
by sandruso on Tuesday October 11, 2022 @01:50AM
(#33159913)
I don't use axios often, but if I need to intercept requests, or set global headers I always need to wrap my fetch function and creating my own "axios". Axios can do these things without hassle.