Skip to content

API 参考 / @142vip/axios / CreateAxiosDefaults

接口: CreateAxiosDefaults<D> ​

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:483

theme_extends ​

类型参数 ​

D ​

D = any

属性 ​

adapter? ​

optional adapter?: AxiosAdapterConfig | AxiosAdapterConfig[]

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:383

继承自 ​

AxiosRequestConfig.adapter


allowAbsoluteUrls? ​

optional allowAbsoluteUrls?: boolean

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:373

继承自 ​

AxiosRequestConfig.allowAbsoluteUrls


allowedSocketPaths? ​

optional allowedSocketPaths?: string | string[] | null

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:409

继承自 ​

AxiosRequestConfig.allowedSocketPaths


auth? ​

optional auth?: AxiosBasicCredentials

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:384

继承自 ​

AxiosRequestConfig.auth


axios-retry? ​

optional axios-retry?: IAxiosRetryConfigExtended

定义于: node_modules/.pnpm/axios-retry@4.5.0_axios@1.17.0/node_modules/axios-retry/dist/cjs/index.d.ts:69

继承自 ​

AxiosRequestConfig.axios-retry


baseURL? ​

optional baseURL?: string

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:372

继承自 ​

AxiosRequestConfig.baseURL


beforeRedirect? ​

optional beforeRedirect?: (options, responseDetails, requestDetails) => void

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:396

参数 ​

options ​

Record<string, any>

responseDetails ​
headers ​

Record<string, string>

statusCode ​

HttpStatusCode

requestDetails ​
headers ​

Record<string, string>

method ​

string

url ​

string

返回 ​

void

继承自 ​

Omit.beforeRedirect


cancelToken? ​

optional cancelToken?: CancelToken

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:414

继承自 ​

AxiosRequestConfig.cancelToken


data? ​

optional data?: D

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:379

继承自 ​

Omit.data


decompress? ​

optional decompress?: boolean

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:415

继承自 ​

AxiosRequestConfig.decompress


env? ​

optional env?: object

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:419

fetch? ​

optional fetch?: (input, init?) => Promise<Response>

参数 ​
input ​

string | URL | Request

init? ​

RequestInit

返回 ​

Promise<Response>

FormData? ​

optional FormData?: (...args) => object

参数 ​
args ​

...any[]

返回 ​

object

Request? ​

optional Request?: (input, init?) => Request

参数 ​
input ​

string | URL | Request

init? ​

RequestInit

返回 ​

Request

Response? ​

optional Response?: (body?, init?) => Response

参数 ​
body? ​

string | Blob | ArrayBuffer | FormData | URLSearchParams | ArrayBufferView<ArrayBufferLike> | null

init? ​

ResponseInit

返回 ​

Response

继承自 ​

Omit.env


family? ​

optional family?: AddressFamily

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:429

继承自 ​

AxiosRequestConfig.family


fetchOptions? ​

optional fetchOptions?: Omit<RequestInit, "headers" | "method" | "signal" | "body"> | Record<string, any>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:448

继承自 ​

AxiosRequestConfig.fetchOptions


formDataHeaderPolicy? ​

optional formDataHeaderPolicy?: "legacy" | "content-only"

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:453

继承自 ​

AxiosRequestConfig.formDataHeaderPolicy


formSerializer? ​

optional formSerializer?: FormSerializerOptions

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:428

继承自 ​

AxiosRequestConfig.formSerializer


headers? ​

optional headers?: AxiosHeaders | Partial<HeadersDefaults> | Partial<RawAxiosHeaders & object & object>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:484


http2Options? ​

optional http2Options?: Record<string, any> & object

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:450

类型声明 ​

sessionTimeout? ​

optional sessionTimeout?: number

继承自 ​

Omit.http2Options


httpAgent? ​

optional httpAgent?: any

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:411

继承自 ​

AxiosRequestConfig.httpAgent


httpsAgent? ​

optional httpsAgent?: any

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:412

继承自 ​

AxiosRequestConfig.httpsAgent


httpVersion? ​

optional httpVersion?: 2 | 1

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:449

继承自 ​

AxiosRequestConfig.httpVersion


insecureHTTPParser? ​

optional insecureHTTPParser?: boolean

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:418

继承自 ​

AxiosRequestConfig.insecureHTTPParser


lookup? ​

optional lookup?: ((hostname, options, cb) => void) | ((hostname, options) => Promise<LookupAddress | [LookupAddressEntry | LookupAddressEntry[], AddressFamily]>)

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:430

继承自 ​

Omit.lookup


maxBodyLength? ​

optional maxBodyLength?: number

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:393

继承自 ​

AxiosRequestConfig.maxBodyLength


maxContentLength? ​

optional maxContentLength?: number

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:391

继承自 ​

AxiosRequestConfig.maxContentLength


maxRate? ​

optional maxRate?: number | [number, number]

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:395

继承自 ​

AxiosRequestConfig.maxRate


maxRedirects? ​

optional maxRedirects?: number

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:394

继承自 ​

AxiosRequestConfig.maxRedirects


method? ​

optional method?: StringLiteralsOrString<Method>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:371

继承自 ​

AxiosRequestConfig.method


onDownloadProgress? ​

optional onDownloadProgress?: (progressEvent) => void

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:390

参数 ​

progressEvent ​

AxiosProgressEvent

返回 ​

void

继承自 ​

Omit.onDownloadProgress


onUploadProgress? ​

optional onUploadProgress?: (progressEvent) => void

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:389

参数 ​

progressEvent ​

AxiosProgressEvent

返回 ​

void

继承自 ​

Omit.onUploadProgress


params? ​

optional params?: any

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:377

继承自 ​

AxiosRequestConfig.params


paramsSerializer? ​

optional paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:378

继承自 ​

AxiosRequestConfig.paramsSerializer


parseReviver? ​

optional parseReviver?: (this, key, value, context?) => any

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:447

参数 ​

this ​

any

key ​

string

value ​

any

context? ​
source? ​

string

返回 ​

any

继承自 ​

Omit.parseReviver


proxy? ​

optional proxy?: false | AxiosProxyConfig

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:413

继承自 ​

AxiosRequestConfig.proxy


redact? ​

optional redact?: string[]

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:454

继承自 ​

AxiosRequestConfig.redact


responseEncoding? ​

optional responseEncoding?: StringLiteralsOrString<responseEncoding>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:386

继承自 ​

AxiosRequestConfig.responseEncoding


responseType? ​

optional responseType?: ResponseType

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:385

继承自 ​

AxiosRequestConfig.responseType


signal? ​

optional signal?: GenericAbortSignal

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:417

继承自 ​

AxiosRequestConfig.signal


socketPath? ​

optional socketPath?: string | null

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:408

继承自 ​

AxiosRequestConfig.socketPath


timeout? ​

optional timeout?: number

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:380

继承自 ​

AxiosRequestConfig.timeout


timeoutErrorMessage? ​

optional timeoutErrorMessage?: string

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:381

继承自 ​

AxiosRequestConfig.timeoutErrorMessage


transformRequest? ​

optional transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[]

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:374

继承自 ​

AxiosRequestConfig.transformRequest


transformResponse? ​

optional transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[]

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:375

继承自 ​

AxiosRequestConfig.transformResponse


transitional? ​

optional transitional?: TransitionalOptions

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:416

继承自 ​

AxiosRequestConfig.transitional


transport? ​

optional transport?: any

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:410

继承自 ​

AxiosRequestConfig.transport


url? ​

optional url?: string

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:370

继承自 ​

AxiosRequestConfig.url


validateStatus? ​

optional validateStatus?: ((status) => boolean) | null

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:392

继承自 ​

Omit.validateStatus


withCredentials? ​

optional withCredentials?: boolean

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:382

继承自 ​

AxiosRequestConfig.withCredentials


withXSRFToken? ​

optional withXSRFToken?: boolean | ((config) => boolean | undefined)

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:446

继承自 ​

Omit.withXSRFToken


xsrfCookieName? ​

optional xsrfCookieName?: string

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:387

继承自 ​

AxiosRequestConfig.xsrfCookieName


xsrfHeaderName? ​

optional xsrfHeaderName?: string

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:388

继承自 ​

AxiosRequestConfig.xsrfHeaderName