Skip to content

API 参考 / @142vip/axios / AxiosRequestConfig

接口: AxiosRequestConfig<D> ​

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

theme_extended_by ​

类型参数 ​

D ​

D = any

属性 ​

adapter? ​

optional adapter?: AxiosAdapterConfig | AxiosAdapterConfig[]

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


allowAbsoluteUrls? ​

optional allowAbsoluteUrls?: boolean

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


allowedSocketPaths? ​

optional allowedSocketPaths?: string | string[] | null

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


auth? ​

optional auth?: AxiosBasicCredentials

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


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


baseURL? ​

optional baseURL?: string

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


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


cancelToken? ​

optional cancelToken?: CancelToken

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


data? ​

optional data?: D

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


decompress? ​

optional decompress?: boolean

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


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


family? ​

optional family?: AddressFamily

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


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


formDataHeaderPolicy? ​

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

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


formSerializer? ​

optional formSerializer?: FormSerializerOptions

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


headers? ​

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

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


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


httpAgent? ​

optional httpAgent?: any

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


httpsAgent? ​

optional httpsAgent?: any

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


httpVersion? ​

optional httpVersion?: 2 | 1

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


insecureHTTPParser? ​

optional insecureHTTPParser?: boolean

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


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


maxBodyLength? ​

optional maxBodyLength?: number

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


maxContentLength? ​

optional maxContentLength?: number

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


maxRate? ​

optional maxRate?: number | [number, number]

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


maxRedirects? ​

optional maxRedirects?: number

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


method? ​

optional method?: StringLiteralsOrString<Method>

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


onDownloadProgress? ​

optional onDownloadProgress?: (progressEvent) => void

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

参数 ​

progressEvent ​

AxiosProgressEvent

返回 ​

void


onUploadProgress? ​

optional onUploadProgress?: (progressEvent) => void

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

参数 ​

progressEvent ​

AxiosProgressEvent

返回 ​

void


params? ​

optional params?: any

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


paramsSerializer? ​

optional paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer

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


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


proxy? ​

optional proxy?: false | AxiosProxyConfig

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


redact? ​

optional redact?: string[]

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


responseEncoding? ​

optional responseEncoding?: StringLiteralsOrString<responseEncoding>

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


responseType? ​

optional responseType?: ResponseType

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


signal? ​

optional signal?: GenericAbortSignal

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


socketPath? ​

optional socketPath?: string | null

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


timeout? ​

optional timeout?: number

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


timeoutErrorMessage? ​

optional timeoutErrorMessage?: string

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


transformRequest? ​

optional transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[]

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


transformResponse? ​

optional transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[]

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


transitional? ​

optional transitional?: TransitionalOptions

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


transport? ​

optional transport?: any

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


url? ​

optional url?: string

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


validateStatus? ​

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

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


withCredentials? ​

optional withCredentials?: boolean

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


withXSRFToken? ​

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

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


xsrfCookieName? ​

optional xsrfCookieName?: string

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


xsrfHeaderName? ​

optional xsrfHeaderName?: string

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