interface TimeoutAddon {
    timeout?: number | (ctx: FetchAddonCtx<TimeoutAddon>) => number;
}

Properties

Properties

timeout?: number | (ctx: FetchAddonCtx<TimeoutAddon>) => number

timeout for the request in ms

pass Infinity or 0 to disable the default timeout from the base options

when the timeout is reached, the request will be aborted and the promise will be rejected with a TimeoutError