import { RequestProxyType, CustomConfigType } from './index.type'; import { AxiosRequestConfig, AxiosResponse } from 'axios'; import { AuthStorageProxyType } from '../types'; declare class RequestProxy implements RequestProxyType { private axios; private authStorage; private defaultCustomConfig; private requestCount; loadingConfig: { timeId?: number; service?: any; }; constructor(config: AxiosRequestConfig, authStorage: AuthStorageProxyType); /** * 发起请求 * @param config 配置项 * @param customConfig 自定义配置 */ private transfromRquest; /** * Loading 的开启关闭 * @param customConfig 自定义配置项 * @param isOpen 是否开启 */ /** * token 处理 * @param config 配置项 * @param customConfig 自定义配置项 */ private addToken; /** * 错误处理 * @param customConfig 配置项 * @param error 错误信息对象 */ private handleError; /** * 处理路径 * @param url 路径 * @param isBaseURL 是否是根路径 */ private transformUrl; get(url: string, config?: AxiosRequestConfig, customConfig?: CustomConfigType): Promise; post(url: string, config?: AxiosRequestConfig, customConfig?: CustomConfigType): Promise; put(url: string, config?: AxiosRequestConfig, customConfig?: CustomConfigType): Promise; patch(url: string, config?: AxiosRequestConfig, customConfig?: CustomConfigType): Promise; delete(url: string, config?: AxiosRequestConfig, customConfig?: CustomConfigType): Promise; } export default RequestProxy;