Wow, thanks everyone! This really clears up the diff between fetch and xhr type for me.
Didn’t realize fetch doesn’t auto-handle HTTP errors—that explains some weird bugs I’ve had. Gonna start checking `response.ok` now.
Also, good point about XHR’s progress tracking. Might stick with fetch for most stuff but keep XHR in mind for file uploads.
Appreciate the links too—MDN’s fetch docs are a lifesaver.
(ps: anyone got a favorite fetch wrapper lib? heard of axios but not sure if it’s worth it.)
Didn’t realize fetch doesn’t auto-handle HTTP errors—that explains some weird bugs I’ve had. Gonna start checking `response.ok` now.
Also, good point about XHR’s progress tracking. Might stick with fetch for most stuff but keep XHR in mind for file uploads.
Appreciate the links too—MDN’s fetch docs are a lifesaver.
(ps: anyone got a favorite fetch wrapper lib? heard of axios but not sure if it’s worth it.)
