import type { Result } from './types'; export declare type HttpProgress = { percent: number; }; export interface HttpAbort { abort(): void; aborted: boolean; onAbort(callback: () => void): void; } export declare type HttpRequestBody = unknown; export declare type HttpProtocol = 'HTTP' | 'HTTPS'; export declare type HttpHeader = Record; export declare type HttpMethod = 'GET' | 'PUT' | 'POST' | 'DELETE'; export declare type OnHttpProgress = (progress: HttpProgress) => void; export interface HttpClientOptions { abort?: HttpAbort; onProgress?: OnHttpProgress; headers?: HttpHeader; body?: HttpRequestBody; } export interface HttpResponse { code: number; data: string; reqId?: string; } export interface HttpClient { get(url: string, options?: HttpClientOptions): Promise>; put(url: string, options?: HttpClientOptions): Promise>; post(url: string, options?: HttpClientOptions): Promise>; delete(url: string, options?: HttpClientOptions): Promise>; } export declare class HttpAbortController implements HttpAbort { aborted: boolean; private listeners; abort(): void; onAbort(callback: () => void): void; } interface FormDataItem { value: any; option?: any; } export declare class HttpFormData { private value; set(key: string, value: any, option?: any): void; get(key: string): FormDataItem | undefined; forEach(callback: (value: any, key?: string, option?: any) => void): void; entries(): Array<[string, any, any | undefined]>; } export declare function isHttpFormData(data: any): data is HttpFormData; export {};