export async function readNodeRequestBody( req: AsyncIterable, ): Promise { const chunks: Uint8Array[] = []; for await (const chunk of req) { chunks.push(typeof chunk === "string" ? Buffer.from(chunk) : Buffer.from(chunk)); } return Buffer.concat(chunks); }