Sse Stream Response Definition
A StreamResponseDefinition specialization for server-sent events.
Overrides configureHeaders to add SSE-specific headers and serialize to append a blank-line event terminator (\r\n) after each event per the SSE specification.
Author
Konstantin Pavlov
Parameters
A Flow of ServerSentEvent representing the stream of SSE events. Defaults to emptyFlow.
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.
Properties
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.