ambientSignalFetch
ambientSignalFetch(
base?): {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: packages/core/src/runtime/callSignalContext.ts:101
Wrap a fetch so that every request it makes is also aborted by the ambient call signal.
The request’s own signal is preserved rather than replaced. The ollama client aborts its
streamed requests through a controller of its own, and dropping that would trade one leak for
another — so the two are composed, and the request aborts when either fires.
Outside a deadline there is no ambient signal and the call is passed through untouched, so installing this on a client costs nothing when no deadline is running.
Parameters
Section titled “Parameters”{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }
The fetch to delegate to. Defaults to the global one.
Returns
Section titled “Returns”A fetch with the same signature, safe to hand to a client constructor.
(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>