Sse Stream Response Definition
Represents a response definition for server-sent events (SSE) streaming.
This class extends StreamResponseDefinition and is used to configure and handle an SSE response. It provides functionality for sending a stream of SSE events to the client, utilizing a specified chunkFlow and configuring response metadata.
Author
Konstantin Pavlov
Parameters
The payload type for the SSE events.
A Flow of ServerSentEvent representing the stream of SSE events. Defaults to null.
The ContentType for the chunks in the SSE stream. Defaults to null.
An optional delay between chunks, specified as a Duration. Defaults to Duration.ZERO.
An HttpFormatter responsible for formatting the HTTP response or payloads.
Constructors
Properties
A list of chunks representing the response data to be sent.
The MIME type of the response content.
Delay between the transmission of each chunk.
A lambda that configures the response headers. Defaults to null.
The HTTP status code of the response. Defaults to HttpStatusCode.OK.
The HTTP status code of the response as Int, defaulting to 200.
The optional response payload associated with this definition.