@thi.ng/server
Version:
Minimal HTTP server with declarative routing, static file serving and freely extensible via pre/post interceptors
11 lines • 664 B
TypeScript
import type { IncomingMessage } from "node:http";
import type { Readable } from "node:stream";
export interface MultipartPart {
headers: Record<string, string>;
body: string | Uint8Array;
}
export declare const parseRequestMultipartData: (req: IncomingMessage) => AsyncGenerator<MultipartPart, void, unknown>;
export declare function parseMultipartData(req: Readable, boundary: string): AsyncGenerator<MultipartPart, void, unknown>;
export declare const chunkParser: (boundary: string) => (chunk: Buffer) => Generator<MultipartPart, void, unknown>;
export declare const parsePart: (buf: Uint8Array) => MultipartPart;
//# sourceMappingURL=multipart.d.ts.map