UNPKG

request-mocking-protocol

Version:
22 lines 760 B
/** * RequestMatcher class. * The same as URLPattern, but for matching the whole HTTP request. * See: https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API * See: https://developer.chrome.com/docs/web-platform/urlpattern * * todo: move to a separate package. */ import { MockRequestSchema } from '../protocol'; export declare class RequestMatcher { schema: MockRequestSchema; private debug?; private methodMatcher; private urlMatcher; private queryMatcher; private headersMatcher; private bodyMatcher; constructor(schema: MockRequestSchema, debug?: boolean | undefined); match(req: Request): Promise<Record<string, string> | null>; private ensureSingleQuerySource; } //# sourceMappingURL=index.d.ts.map