upvote
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.
reply
You can pipe through a TransformStream that counts how many bytes you've uploaded, right?
reply
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?
reply
Some might say the tradeoff of writing a small wrapper is worth it given what’s been demonstrated here.
reply
Yeah but what about other deps like db drivers?
reply
In my experience people feel the need to wrap axios too.
reply
These are the kind of people I hope AI replaces
reply
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.
reply
Speak for yourself, Claude works fine with fetch on my system.
reply