Skip to content
providerkit
GitHub

SseRequest

type SseRequest =
| string
| URL
| {
body?: unknown;
headers?: HeadersInit;
method?: string;
url: string | URL;
};

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

Where a request goes. An address alone uses the method and the body in the table on SseTransportOptions.

string


URL


{
body?: unknown;
headers?: HeadersInit;
method?: string;
url: string | URL;
}
optional body?: unknown;

Any JSON value, sent as JSON. Defaults to the command’s own value from the table.

optional headers?: HeadersInit;
optional method?: string;

Defaults to GET without a body and POST with one.

url: string | URL;