UNPKG

@n1k1t/mock-server

Version:

Powerful util to setup mocks over HTTP APIs

8 lines 618 B
import { IncomingMessage } from 'http'; import { IRequestContextIncoming } from './types'; import { TRequestPayloadType } from '../../types'; export declare const extractPayloadType: (headers: IncomingMessage["headers"]) => TRequestPayloadType | null; export declare const parsePayload: (type: TRequestPayloadType, payload: Buffer) => object | undefined; export declare const serializePayload: (type: TRequestPayloadType, payload: object | null) => Buffer | undefined; export declare const extractHttpIncommingContext: (request: IncomingMessage) => Promise<IRequestContextIncoming>; //# sourceMappingURL=utils.d.ts.map