SseStreamResponseDefinition

constructor(chunkFlow: Flow<ServerSentEvent>? = null, chunkContentType: ContentType? = null, delay: Duration = Duration.ZERO, formatter: HttpFormatter)(source)

Parameters

P

The payload type for the SSE events.

chunkFlow

A Flow of ServerSentEvent representing the stream of SSE events. Defaults to null.

chunkContentType

The ContentType for the chunks in the SSE stream. Defaults to null.

delay

An optional delay between chunks, specified as a Duration. Defaults to Duration.ZERO.

formatter

An HttpFormatter responsible for formatting the HTTP response or payloads.