UNPKG

@n1k1t/mock-server

Version:

The ultimate toolkit to intercept, transform, and simulate HTTP/WS traffic with type-safe expectations

35 lines 1.21 kB
import { IncomingMessage } from 'http'; import { Duplex } from 'stream'; import { IRequestContextIncoming, Provider, RequestContext, WebSocket } from '../../models'; export declare class WsRequestContext extends RequestContext<{ transport: 'ws'; flag: string & {}; }> { provider: Provider; incoming: IRequestContextIncoming; request: IncomingMessage; socket: Duplex; head: Buffer; snapshot: import("../../models").RequestContextSnapshot<{ transport: "ws"; flag: string & {}; }> & { state?: object | undefined; }; history: import("../../models").History; additional: { ws: WebSocket<any, any> | null; }; constructor(provider: Provider, incoming: IRequestContextIncoming, request: IncomingMessage, socket: Duplex, head: Buffer); compileSnapshot(): import("../../models").RequestContextSnapshot<{ transport: "ws"; flag: string & {}; }> & { state?: object | undefined; }; handle(): this; skip(): this; complete(): this; static build(provider: Provider, request: IncomingMessage, socket: Duplex, head: Buffer): Promise<WsRequestContext>; } //# sourceMappingURL=context.d.ts.map