Skip to content

RequestInit_

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

body: unknown;

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


optional fetchImpl?: (input, init?) => Promise<Response>;

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

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

MDN Reference

Parameter Type
input RequestInfo | URL
init? RequestInit

Promise<Response>


optional finished?: () => boolean;

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

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

boolean


optional headers?: Record<string, string>;

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


optional onActivity?: () => void;

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

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:27

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

void


optional onRateLimit?: (reading) => void;

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

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:19

Names the provider in the error envelope.


optional signal?: AbortSignal;

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


url: string;

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