Skip to content
providerkit
GitHub

RequestInit_

Defined in: core/src/transport.ts:25

body: unknown;

Defined in: core/src/transport.ts:28


optional fetchImpl?: FetchLike;

Defined in: core/src/transport.ts:33

Swapped in tests, or to route through a proxy. Defaults to global fetch.


optional finished?: () => boolean;

Defined in: core/src/transport.ts:43

Whether the turn already stated its finish. See SseHooks.finished.

boolean


optional headers?: Record<string, string>;

Defined in: core/src/transport.ts:27


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.

void


optional onDone?: () => void;

Defined in: core/src/transport.ts:38

Called when the body states [DONE]. See SseHooks.onDone.

void


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.

Parameter Type
reading RateLimitReading

void


provider: string;

Defined in: core/src/transport.ts:30

Names the provider in the error envelope.


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).


optional signal?: AbortSignal;

Defined in: core/src/transport.ts:31


url: string;

Defined in: core/src/transport.ts:26