Sha256: 7c44ad99bfe40d7296d008408a1ae26ee97a3816a11e26d9637e9ef1da1e7189

Contents?: true

Size: 1.51 KB

Versions: 26

Compression:

Stored size: 1.51 KB

Contents

import { D as DefaultBodyType, c as RequestHandlerOptions, a as ResponseResolver } from './HttpResponse-DE19n76Q.js';
import { HttpHandler, HttpRequestResolverExtras } from './handlers/HttpHandler.js';
import { PathParams, Path } from './utils/matching/matchRequestUrl.js';
import './utils/internal/isIterable.js';
import './typeUtils.js';

type HttpRequestHandler = <Params extends PathParams<keyof Params> = PathParams, RequestBodyType extends DefaultBodyType = DefaultBodyType, ResponseBodyType extends DefaultBodyType = undefined, RequestPath extends Path = Path>(path: RequestPath, resolver: HttpResponseResolver<Params, RequestBodyType, ResponseBodyType>, options?: RequestHandlerOptions) => HttpHandler;
type HttpResponseResolver<Params extends PathParams<keyof Params> = PathParams, RequestBodyType extends DefaultBodyType = DefaultBodyType, ResponseBodyType extends DefaultBodyType = DefaultBodyType> = ResponseResolver<HttpRequestResolverExtras<Params>, RequestBodyType, ResponseBodyType>;
/**
 * A namespace to intercept and mock HTTP requests.
 *
 * @example
 * http.get('/user', resolver)
 * http.post('/post/:id', resolver)
 *
 * @see {@link https://mswjs.io/docs/api/http `http` API reference}
 */
declare const http: {
    all: HttpRequestHandler;
    head: HttpRequestHandler;
    get: HttpRequestHandler;
    post: HttpRequestHandler;
    put: HttpRequestHandler;
    delete: HttpRequestHandler;
    patch: HttpRequestHandler;
    options: HttpRequestHandler;
};

export { type HttpRequestHandler, type HttpResponseResolver, http };

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.25 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.24 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.23 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.22 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.21 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.20 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.19 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.18 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.17 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.16 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.15 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.14 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.13 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.12 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.11 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.10 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.9 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.8 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts
clapton-0.0.7 lib/clapton/javascripts/node_modules/msw/lib/core/http.d.ts