Skip to content
providerkit
GitHub

SseTransportOptions

Defined in: react/src/sse.ts:52

One builder per command. A command without one is one this transport cannot do, and the client does not offer it.

Builder Method Default body A success is
observe GET none an event stream, or a 204 with nothing to send
send POST the SendInput the event stream, or anything else when taken
respond POST { answers } the event stream, or anything else when taken
stop POST { run } any 2xx

A 4xx means the host refused and did nothing, and a JSON body of { code, message } (or { error: { code, message } }) becomes the error shown. A 5xx or a lost connection means the outcome is unknown.

optional fetch?: FetchLike;

Defined in: react/src/sse.ts:60

Every request goes through it. Pass your own to add auth, cookies or a base URL. Defaults to the global fetch.


optional observe?: (cursor) => SseRequest;

Defined in: react/src/sse.ts:54

The stream after cursor, or from the start without one.

Parameter Type
cursor Cursor | undefined

SseRequest


optional respond?: (answers) => SseRequest;

Defined in: react/src/sse.ts:56

Parameter Type
answers readonly RequestAnswer[]

SseRequest


optional send?: (input) => SseRequest;

Defined in: react/src/sse.ts:55

Parameter Type
input SendInput

SseRequest


optional stop?: (run) => SseRequest;

Defined in: react/src/sse.ts:57

Parameter Type
run RunInfo

SseRequest