import type { Cookie } from "tough-cookie"; export type HttpFormData = { [key: string]: string; }; /** * Allows multiple entries for the same key */ export type MultiQueryFormData = { [key: string]: string | string[]; }; export interface IHttpClientOptions { baseUrl: string; /** * Retry time-out, default 500 ms */ timeout: number; userAgent: string; followRedirects?: boolean; } export interface IFetchOptions { query?: MultiQueryFormData; retryLimit?: number; body?: string; headers?: HeadersInit; followRedirects?: boolean; } export declare class HttpClient { protected httpOptions: IHttpClientOptions; constructor(httpOptions: IHttpClientOptions); get(path: string, options?: IFetchOptions): Promise; post(path: string, options?: IFetchOptions): Promise; postForm(path: string, formData: HttpFormData, options?: IFetchOptions): Promise; postJson(path: string, json: Object, options?: IFetchOptions): Promise; private _fetch; private _buildUrl; private _delay; protected registerCookies(_response: Response): Promise; getCookies(): Promise; }