Posts tagged “undici”
Third-party API latency: measuring vendor slowness and failures in Node
The vendor status page is green and your checkout is slow. Here is how to measure third-party API latency and failures from your own Node servers, per dependency, without wrapping fetch.
SSRF in Node.js: the fetch() you didn't mean to make
A customer pastes a webhook URL pointing at your cloud metadata endpoint, and your API fetches it. Learn how SSRF in Node.js happens, why blocklists on URL strings fail, and a tested safeFetch() you can ship today.
How to log outbound HTTP requests in Node.js
Your API threw 502s because a provider was timing out, and your logs said nothing. Log outbound HTTP requests from fetch and axios with diagnostics_channel in an afternoon, then read error rate and p95 per host.
Node.js fetch timeout: deadlines with AbortSignal and undici
One slow vendor and every handler hangs, because Node fetch waits up to five minutes by default. Here is how to set deadlines with AbortSignal and undici in Express and Fastify.