UNPKG

@sigiljs/sigil

Version:

TypeScript-first Node.js HTTP framework offering schema-driven routing, modifier-based middleware, plugin extensibility, and flexible response templating

11 lines (10 loc) 434 B
import { IncomingMessage } from 'node:http'; /** * Reads the entire request body into a Buffer. * Resolves to a Buffer containing concatenated data chunks, * or null if an error occurs during reading. * * @param req incoming HTTP message to read the body from. * @returns promise that resolves with the full body Buffer or null on error. */ export default function readBodyBuffer(req: IncomingMessage): Promise<Buffer | null>;