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.
Properties
Section titled “Properties”fetch?
Section titled “fetch?”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.
observe?
Section titled “observe?”optional observe?: (cursor) => SseRequest;Defined in: react/src/sse.ts:54
The stream after cursor, or from the start without one.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cursor |
Cursor | undefined |
Returns
Section titled “Returns”respond?
Section titled “respond?”optional respond?: (answers) => SseRequest;Defined in: react/src/sse.ts:56
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
answers |
readonly RequestAnswer[] |
Returns
Section titled “Returns”optional send?: (input) => SseRequest;Defined in: react/src/sse.ts:55
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
SendInput |
Returns
Section titled “Returns”optional stop?: (run) => SseRequest;Defined in: react/src/sse.ts:57
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
run |
RunInfo |