import { BlockingResolver, Resolvable } from 'the-promise'; import { ITracker } from './tracker'; import { IHttpClient, RequestInfo, ClientResponse, HttpMethod, HttpClientError } from './types'; export type AuthorizerCb = () => Resolvable; export interface HttpClientOptions { timeout?: number; retry?: HttpClientRetryOptions; headers?: Record; tracker?: Partial; absorbFailures?: boolean; authorizerCb?: AuthorizerCb; authorizerResolverCb?: BlockingResolver; } export interface HttpClientRetryOptions { unlimitedRetries?: boolean; retryCount?: number; initRetryDelay?: number; maxRetryDelay?: number; retryDelayCoeff?: number; canContinueCb?: (reason: HttpClientError, requestInfo: RequestInfo) => Resolvable; } export declare class HttpClient implements IHttpClient { private _urlBase; private _options; private _retry; private _tracker; private _headers; private _authorizerResolver; constructor(urlBase?: string, options?: Partial); get urlBase(): string | undefined; scope(url: string): HttpClient; header(name: string, value: string): this; get, TBody = Record | null>(url: string, params?: TParams): Promise>; delete, TBody = Record | null>(url: string, params?: TParams): Promise>; post, TBody = Record | null>(url: string, params?: TParams, data?: TBody): Promise>; patch, TBody = Record | null>(url: string, params?: TParams, data?: TBody): Promise>; put, TBody = Record | null>(url: string, params?: TParams, data?: TBody): Promise>; options, TBody = Record | null>(url: string, params?: TParams, data?: TBody): Promise>; execute, TBody = Record | null>(method: HttpMethod, url: string, params?: TParams, data?: TBody | null): Promise>; private _makeError; private _executeSingle; private _prepareHeaders; } //# sourceMappingURL=http-client.d.ts.map