RequestInit_
Defined in: core/src/transport.ts:25
Properties
Section titled “Properties”body: unknown;Defined in: core/src/transport.ts:28
fetchImpl?
Section titled “fetchImpl?”optional fetchImpl?: FetchLike;Defined in: core/src/transport.ts:33
Swapped in tests, or to route through a proxy. Defaults to global fetch.
finished?
Section titled “finished?”optional finished?: () => boolean;Defined in: core/src/transport.ts:43
Whether the turn already stated its finish. See SseHooks.finished.
Returns
Section titled “Returns”boolean
headers?
Section titled “headers?”optional headers?: Record<string, string>;Defined in: core/src/transport.ts:27
onActivity?
Section titled “onActivity?”optional onActivity?: () => void;Defined in: core/src/transport.ts:36
Called when the response headers arrive and on every body read after, keep-alives included. What the watchdog’s idle clock runs on.
Returns
Section titled “Returns”void
onDone?
Section titled “onDone?”optional onDone?: () => void;Defined in: core/src/transport.ts:38
Called when the body states [DONE]. See SseHooks.onDone.
Returns
Section titled “Returns”void
onRateLimit?
Section titled “onRateLimit?”optional onRateLimit?: (reading) => void;Defined in: core/src/transport.ts:41
Called when the response headers report how full a subscription window
is. See StreamOptions.onRateLimit.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
reading |
RateLimitReading |
Returns
Section titled “Returns”void
provider
Section titled “provider”provider: string;Defined in: core/src/transport.ts:30
Names the provider in the error envelope.
redirect?
Section titled “redirect?”optional redirect?: RequestRedirect;Defined in: core/src/transport.ts:50
Set "error" on any call that carries a credential to a host the user typed.
A cross-origin redirect keeps custom headers such as x-goog-api-key, so a
wrong or hostile address would be handed the key. The redirect then fails
the call instead of following. Absent: the runtime’s default (follow).
signal?
Section titled “signal?”optional signal?: AbortSignal;Defined in: core/src/transport.ts:31
url: string;Defined in: core/src/transport.ts:26