1.6.0 README.md update

This commit is contained in:
xiaoma
2021-12-24 10:48:49 +08:00
parent fc5e138ed8
commit 1ab8b5b221
25 changed files with 2848 additions and 2956 deletions

View File

@@ -4,6 +4,12 @@
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
import type { RequestOptions, Result } from './types';
export interface CreateAxiosOptions extends AxiosRequestConfig {
authenticationScheme?: string;
transform?: AxiosTransform;
requestOptions?: RequestOptions;
}
export abstract class AxiosTransform {
/**
* @description: 请求之前处理配置
@@ -24,7 +30,10 @@ export abstract class AxiosTransform {
/**
* @description: 请求之前的拦截器
*/
requestInterceptors?: (config: AxiosRequestConfig) => AxiosRequestConfig;
requestInterceptors?: (
config: AxiosRequestConfig,
options: CreateAxiosOptions
) => AxiosRequestConfig;
/**
* @description: 请求之后的拦截器