interface Profile { socketReused?: boolean; // 是否复用连接 } export interface DownLoadOptions { url: string; header: Record; filePath?: string; appendHostCookie?: boolean; timeout?: number; } export interface DownLoadResponse { statusCode?: number; tempFilePath?: string; errMsg?: string; profile?: Profile; filePath?: string; header?: Record; } export type HTTPMethod = | 'GET' | 'OPTIONS' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'CONNECT' | 'PATCH'; export interface FetchOptions { method?: HTTPMethod; data?: Record | string | ArrayBuffer; query?: Record; header?: Record; dataType?: string; // 'json' timeout?: number; enableCache?: boolean; responseType?: string; // 'text' | 'arraybuffer'; appendHostCookie?: boolean; } export interface FetchResponse { header?: Record; code?: string; message?: string; data: T; errMsg?: string; prefetchDetail?: number; size?: number; profile?: Profile; } export interface UpLoadOptions { url: string; filePath: string; name: string; header: Record; formData: Record; appendHostCookie?: boolean; timeout?: number; } export interface UpLoadResponse | ArrayBuffer | undefined> { statusCode?: number; data: T; errMsg?: string; progress?: number; profile?: Profile; } export enum RequestFrom { PUBLIC = 'public', INNER = 'inner' }