1 | import { Middleware } from './middlewares/middleware';
|
2 | import { HttpRequest } from './request';
|
3 | export declare type Path = string;
|
4 | export declare type FetchAdapter = (url: string, request: RequestInit) => Promise<Response>;
|
5 | export declare type HttpClient = (path: Path, options?: Partial<HttpRequest>) => Promise<Response>;
|
6 | export declare function withDefaults(request: Partial<HttpRequest>): Partial<HttpRequest>;
|
7 | export interface ClientConfiguration {
|
8 | middleware?: Middleware<any>;
|
9 | fetch?: FetchAdapter;
|
10 | }
|
11 | export declare function createHttp(opts?: ClientConfiguration): HttpClient;
|