UNPKG

mappersmith

Version:

It is a lightweight rest client for node.js and the browser

21 lines (18 loc) 633 B
import { R as Request, b as Response, P as ParsedJSON } from '../index-D3_z6QHM.mjs'; import { Headers } from '../types.mjs'; interface ResponseFactoryArgs { method?: string; host?: string; path?: string; request?: Request; status?: number; data?: string | Record<string, unknown>; headers?: Headers; errors?: Array<Error | string>; } /** * Create a response to use in tests * @returns Response */ declare const responseFactory: ({ method, host, path, request, status, data, headers, errors, }?: ResponseFactoryArgs) => Response<ParsedJSON>; export { type ResponseFactoryArgs, responseFactory };