The type of individual elements in the stream.
Creates a new SSE streaming endpoint.
The type of individual elements in the stream.
The endpoint used to navigate to this one.
The URI of this endpoint relative to the referrer's. Add a ./ prefix here to imply a trailing slash in the referrer's URI.
OptionaleventType: string
If set, only events with this event: type are provided; others are ignored. Leave unspecified to provide all events.
Whether to transparently reconnect on connection drops, transient transport errors and 5xx responses.
The reconnection interval in milliseconds used when the server has not (yet) supplied one via the SSE retry: field.
ReadonlyerrorHandles errors in responses.
ReadonlyhttpThe HTTP client used to communicate with the remote resource.
ReadonlylinkExtracts links from responses.
ReadonlyserializerControls the serialization of entities sent to and received from the server.
ReadonlyuriThe HTTP URI of the remote resource.
Resolves all links with a specific relation type. Uses cached data from last response.
The relation type of the links to look for.
Retrieves a link template with a specific relation type. Uses cached data from last response. Prefer linkTemplate when possible.
The relation type of the link template to look for.
errors!NotFoundError: No link template with the specified rel could be found.
ProtectedhandleProtectedhandleHandles allowed HTTP methods and other capabilities reported by the server.
ProtectedisShows whether the server has indicated that a specific HTTP method is currently allowed. Uses cached data from last response.
The HTTP methods (e.g. GET, POST, ...) to check.
true if the method is allowed, false if the method is not allowed, undefined if no request has been sent yet or the server did not specify allowed methods.
ProtectedjoinResolves a relative URI using this endpoint's URI as the base.
The relative URI to resolve. Prepend ./ to imply a trailing slash in the base URI even if it is missing there.
Resolves a single link with a specific relation type. Uses cached data from last response.
The relation type of the link to look for.
errors!NotFoundError: No link with the specified rel could be found.
Resolves a link template with a specific relation type. Uses cached data from last response.
The relation type of the link template to look for.
Variables for resolving the template.
errors!NotFoundError: No link template with the specified rel could be found.
ProtectedsendSends an HTTP request to this endpoint's URI. Handles various cross-cutting concerns regarding a response message such as discovering links and handling errors.
The HTTP method to use.
Optionalsignal: AbortSignal
Used to cancel the request.
Optionalheaders: HeadersInit
The HTTP headers to set.
Optionalbody: BodyInit
The body to send.
Registers one or more default links for a specific relation type. These links are used when no links with this relation type are provided by the server. This should only be called during initial setup of the endpoint.
The relation type of the link to add.
Optionalhref: string
The href of the link relative to this endpoint's URI. Leave unspecified to remove any previous entries for the relation type.
Registers a default link template for a specific relation type. This template is used when no template with this relation type is provided by the server. This should only be called during initial setup of the endpoint.
The relation type of the link to add.
Optionalhref: string
The templates href relative to this endpoint's URI. Leave unspecified to remove any previous entries for the relation type.
Provides a stream of TEntitys, reconnecting as needed unless autoReconnect is disabled.
Optionalsignal: AbortSignal
Used to close the connection.
errors!HttpError: Other non-success status code
Protected StaticensureAdds a trailing slash to the URI if it does not already have one.
Endpoint for a stream of
TEntitys using Server-Sent Events (SSE).Sends
Accept: text/event-stream. By default, transparently reconnects on connection drops or transient errors, honoring the server-suppliedretry:interval and resuming via the http!HttpHeader.LastEventId header.