Streams
Stream large bodies instead of buffering them, so the first byte reaches the visitor sooner.
const { readable, writable } = new TransformStream();
ctx.waitUntil(pump(writable));
return new Response(readable, { headers: { "content-type": "text/plain" } });Updated
Was this page helpful?