Constructors
constructor
- new Http(): Http
Properties
canceler
canceler: AxiosCanceler
Methods
get
- get<T>(options): Promise<AxiosResponse<T, any>>
Returns Promise<AxiosResponse<T, any>>
post
- post<T>(options): Promise<AxiosResponse<T, any>>
Returns Promise<AxiosResponse<T, any>>
put
- put<T>(options): Promise<AxiosResponse<T, any>>
Returns Promise<AxiosResponse<T, any>>
request
- request<T>(options): Promise<AxiosResponse<T, any>>
Parameters
options: {
isOutPutObjectURL?: boolean;
key?: string;
printError?: boolean;
retry?: number;
url: string;
useIndexedDb?: boolean;
beforeRequest?(options): any;
} & AxiosRequestConfig<any> & {
method: "POST" | "GET" | "PUT";
}
Returns Promise<AxiosResponse<T, any>>
transformUrlHook
- transformUrlHook(url): string
Returns string
对 URL 进行转换,用于被重写