Re:Axios Compromised on NPM – Malicious Versions Drop Remote...
by pier25 on Tuesday March 31, 2026 @09:12AM
(#47586877)
People use axios or ky because with fetch you inevitably end up writing a small wrapper on top of it anyway.
[ Parent
| on HN ]
Re:Axios Compromised on NPM – Malicious Versions Drop Remote...
by zachrip on Tuesday March 31, 2026 @10:57AM
(#47588281)
Fetch has also lacked support for features that xhr has had for over a decade now. For example upload progress. It's slowly catching up though, upload progress is the only thing I'd choose xhr for.
Re:Axios Compromised on NPM – Malicious Versions Drop Remote...
by apitman on Tuesday March 31, 2026 @04:26PM
(#47593003)
You can pipe through a TransformStream that counts how many bytes you've uploaded, right?
Re:Axios Compromised on NPM – Malicious Versions Drop Remote...
by zachrip on Tuesday March 31, 2026 @05:39PM
(#47593823)
That is a way to approximate it, though I'd be curious to know the semantics compared to xhr - would they both show the same value at the same network lifecycle of a given byte?
Re:Axios Compromised on NPM – Malicious Versions Drop Remote...
by afavour on Wednesday April 01, 2026 @07:09AM
(#47599311)
That would show how quickly the data is passing into the native fetch call but doesn’t account for kind of internal buffer it might have, network latency etc
Re:Axios Compromised on NPM – Malicious Versions Drop Remote...
by jmull on Tuesday March 31, 2026 @10:20AM
(#47587793)
In my experience people feel the need to wrap axios too.
Re:Axios Compromised on NPM – Malicious Versions Drop Remote...
by kube-system on Tuesday March 31, 2026 @02:43PM
(#47591691)
These are the kind of people I hope AI replaces
Re:Axios Compromised on NPM – Malicious Versions Drop Remote...
by nathancahill on Tuesday March 31, 2026 @03:53PM
(#47592572)
AI was trained on Axios wrappers, so it's just going to be wrappers all the way down. Look inside any company "API Client" and it's just a branded wrapper around Axios.
Re:Axios Compromised on NPM – Malicious Versions Drop Remote...
by kube-system on Tuesday March 31, 2026 @04:29PM
(#47593042)
Speak for yourself, Claude works fine with fetch on my system.
Re:Axios Compromised on NPM – Malicious Versions Drop Remote...
by lukeschlather on Wednesday April 01, 2026 @11:08AM
(#47601944)
I have never consciously wrapped Axios or fetch, but a cursory search suggests that there was a time when it was impossible for either to force TLS1.3. It's easy to imagine alternate implementations exist for frivolous reasons, but sometimes there are hard security or performance requirements that force you into them.