- New package
packages/http.outboundCallEffectin@fofo/http/outboundmakes one call with a deadline, the caller's cancellation,redirect: "manual"(a 3xx is a failure), a bounded read of the answer and one tagged failure:network,timeout,statuswithRetry-After,redirect,invalid-bodyorcancelled.outboundCallis its Promise facade.@fofo/http/read-boundedholds the one bounded stream reader (readBounded,boundedChunks,readBoundedJson). See packages/http and backend conventions. (#244) - Every transport uses it. Stripe, Polar and Pagar.me requests, the RevenueCat verification (its copy of the same logic is gone), Expo push, webhook deliveries (the SSRF check still runs first), the Resend and Cloudflare REST email providers, the error tunnel's forward, the Cloudflare analytics read, the GitHub issue and the S3 control requests keep only what a failure means for them. Eight hand-written reader loops became one. (#244)
- Changed on purpose. A payment provider's 408 or 425 is now retryable like 429 and 5xx, as push and webhooks already treated them. The tracker's answer to a forwarded error envelope is bounded at 64 KiB; past it the tunnel answers 502. (#244)
- A test keeps the calls in one place.
scripts/outbound-http.test.mjsfails on afetchcall in Worker-side code outside the module and on a stream reader outside the bounded reader. It replacesscripts/workerd-fetch-redirect.test.mjs: with one call site, the redirect mode is asserted once, in the module's own suite. In a project made from this template, new outbound code calls the module instead offetch. (#244)
One outbound HTTP call module and one bounded stream reader
Every request the Worker sends to another host now goes through one module that sets the deadline, never follows a redirect, bounds the answer and classifies the failure. Transports keep only their domain mapping.
Edit on GitHubDocumentation is in English.