Home > @dinofe/xt-core > CustomConfig

# CustomConfig interface

HTTP 自定义配置

Signature:

export interface CustomConfig 

# Properties

Property Modifiers Type Description
appKey? string (Optional)
commonHeaders? (request: CustomAxiosRequestConfig) => Record<string, any> | Promise<Record<string, any>> (Optional)
commonParams? (request: CustomAxiosRequestConfig) => Record<string, any> | Promise<Record<string, any>> (Optional)
encryptVersion? EncryptVersion (Optional)
isInvalidToken? (data: any, response: XApiResponse<any, any>) => boolean (Optional)
nestBizData? boolean | string (Optional) commonParams 基础参数与业务参数保持嵌套 true | undefined: 保持嵌套在 body 下 false: 不嵌套 string: 签到在 nestBizData 下; 默认:undefined; 在 encryptVersion = '2' 时嵌套在 body 下,此配置无效
noFail? boolean (Optional)
noStatusTransform? boolean (Optional)
onFail? (msg: FailMessageType, response: XApiResponse<any, any>) => void (Optional)
onInvalidToken? (response: XApiResponse<any, any>) => void (Optional)
useEncrypt? boolean (Optional)
useSign? boolean (Optional)