UNPKG

@amadeus-it-group/kassette

Version:

Development server, used mainly for testing, which proxies requests and is able to easily manage local mocks.

16 lines (15 loc) 655 B
import { IncomingMessage, IncomingHttpHeaders } from 'http'; import { IFetchedServerResponse, ServerResponseStatus } from './model'; /** * Implementation of the wrapper around a fetched response. * * @param original The original response object (that can be retrieved through `original`) * @param buffer The body of the response (that can be retrieved through `body`) */ export declare class ServerResponse implements IFetchedServerResponse { readonly original: IncomingMessage; readonly body: Buffer; constructor(original: IncomingMessage, body: Buffer); get headers(): IncomingHttpHeaders; get status(): ServerResponseStatus; }