RequestConfig
接口请求配置
签名
interface RequestConfig {
url: string
method?: HttpMethod | undefined
headers?: Record<string, string> | undefined
params?: Record<string, unknown> | undefined
data?: unknown
timeout?: number | undefined
signal?: AbortSignal | undefined
responseType?: ResponseType | undefined
retry?: RetryOptions | undefined
}成员
| 名称 | 类型 | 描述 |
|---|---|---|
| url | string | — |
| method可选 | HttpMethod | undefined | — |
| headers可选 | Record<string, string> | undefined | — |
| params可选 | Record<string, unknown> | undefined | — |
| data可选 | unknown | — |
| timeout可选 | number | undefined | — |
| signal可选 | AbortSignal | undefined | — |
| responseType可选 | ResponseType | undefined | — |
| retry可选 | RetryOptions | undefined | — |
源码
packages/http/src/core/types.ts:16