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) 501 B
import { Internal } from '../../types'; /** * Handler for binary payloads. * Reads the entire request body into a buffer and wraps it as a file. * * @param req verified incoming HTTP message with raw headers and body. * @returns promise resolving to a RequestProcessorResponse containing * no JSON body and a single file entry with the buffered data. */ export default function binaryHandler(req: Internal.Requests.VerifiedIncomingMessage): Promise<Internal.Requests.RequestProcessorResponse>;