HTTP Clients in Node.js: fetch, undici, AbortSignal.timeout, Keep-Alive, Streaming Bodies and Retries
In Node.js you call external services with the global fetch, but it is not safe without a response.ok check, AbortSignal.timeout, a body that is read or cancelled, and retries that respect idempotency. With real output: a catch that never runs on a 404, a request waiting 301 seconds, a connection lost to an unread body, a file streamed in 131 MB instead of 329 MB, retry waves without jitter, and a carrier tracking client tested with MockAgent.
15 Nov 2026
·
15 min
·
7