// 请求方法类型
export type Method = 'GET' | 'POST' | 'PUT' | 'DELETE'

// 请求配置接口
export interface RequestOptions {
    url: string
    method: Method
    data?: any
    header?: Record<string, string>
    timeout?: number
    dataType?: string
    responseType?: string
}

// 响应数据接口
export interface ResponseData<T = any> {
    data: T
    statusCode: number
    header: Record<string, string>
    errMsg?: string
}

// 错误响应接口
export interface ErrorResponse {
    code: number
    message: string
    data?: any
}
