函数: fetchWithResilience()
ts
function fetchWithResilience(
input,
init,
options?): Promise<Response>;定义于: packages/shared/src/http-resilience.ts:61
带可选超时与重试的 fetch。
参数
| 参数 | 类型 | 描述 |
|---|---|---|
input | string | URL | 请求 URL |
init | RequestInit | undefined | fetch init(勿与本函数的 timeout 抢用外部 signal) |
options | HttpResilienceOptions | 韧性选项 |
返回
Promise<Response>
Response(调用方读 body / 映射业务错误)
