@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) • 518 B
TypeScript
import { Internal } from '../../types';
/**
* Handler for buffered payloads.
* Reads the entire request body into a buffer and returns it as the JSON body.
*
* @param req verified incoming HTTP message to read the body from.
* @returns promise resolving to a RequestProcessorResponse containing
* an IncomingBody with the buffered data or null, and no file entries.
*/
export default function bufferHandler(req: Internal.Requests.VerifiedIncomingMessage): Promise<Internal.Requests.RequestProcessorResponse>;