export declare namespace EasyCoderHttp {
    type Method = 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'PURGE' | 'LINK' | 'UNLINK' | 'get' | 'post' | 'delete' | 'put' | 'patch' | 'head' | 'options' | 'purge' | 'link' | 'unlink';
    type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
    interface ProgressEvent {
        loaded: number;
        total?: number;
        progress?: number;
        bytes: number;
        rate?: number;
        estimated?: number;
        upload?: boolean;
        download?: boolean;
        event?: any;
    }
    interface RequestOptions {
        url: string;
        method?: Method;
        headers?: Record<string, string>;
        data?: any;
        params?: any;
        responseType?: ResponseType;
        onUploadProgress?: (e: ProgressEvent) => void;
    }
    interface Response<T extends any = any> {
        data: T;
        headers: Record<string, string>;
        status: number;
    }
    type UseHeaderReturn = {
        pass: true;
        headers: Record<string, string>;
    } | {
        pass: false;
    };
    interface UseHeaderOption {
        needLogin?: boolean;
        cache?: {
            expireTime?: number;
        };
    }
    interface UseHeader {
        (options?: UseHeaderOption): UseHeaderReturn;
    }
    interface UploadFileProgress {
        (loaded: number, total: number): void;
    }
    interface UploadFileError {
        (msg: string): void;
    }
    interface UploadOptions {
        onProgress?: UploadFileProgress;
        onError?: UploadFileError;
    }
}
