Kinda surprised no one’s mentioned streaming yet!
XHR can’t do streaming responses natively, but fetch can with `response.body`. That’s a game-changer for real-time stuff.
Downside? fetch’s error handling is *trash*. Miss a 500? Tough luck unless you write extra checks.
XHR’s `onerror` is simpler for sure.
XHR can’t do streaming responses natively, but fetch can with `response.body`. That’s a game-changer for real-time stuff.
Downside? fetch’s error handling is *trash*. Miss a 500? Tough luck unless you write extra checks.
XHR’s `onerror` is simpler for sure.
