RequestInit_
Defined in: core/src/transport.ts:14
Properties
Section titled “Properties”body: unknown;Defined in: core/src/transport.ts:17
fetchImpl?
Section titled “fetchImpl?”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
RequestInfo | URL |
init? |
RequestInit |
Returns
Section titled “Returns”Promise<Response>
finished?
Section titled “finished?”optional finished?: () => boolean;Defined in: core/src/transport.ts:32
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:16
onActivity?
Section titled “onActivity?”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.
Returns
Section titled “Returns”void
onDone?
Section titled “onDone?”optional onDone?: () => void;Defined in: core/src/transport.ts:27
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:30
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:19
Names the provider in the error envelope.
signal?
Section titled “signal?”optional signal?: AbortSignal;Defined in: core/src/transport.ts:20
url: string;Defined in: core/src/transport.ts:15