respondsWithSseStream

Associates the current RequestSpecification with a server-sent events (SSE) streaming response definition. This method is part of a fluent API for defining mappings between requests and SSE streaming responses.

Parameters

block

A suspend lambda applied to a StreamingResponseDefinitionBuilder specifically for configuring the response as a stream of server-sent events.

Type Parameters

T

The type of data field in the ServerSentEventMetadata.


Associates the current RequestSpecification with an SSE streaming response definition.

This overload accepts an explicit responseType class token to help the compiler infer the type parameter T (type-witness pattern). The responseType value itself is not used at runtime.

Parameters

responseType

A KClass token for T, used only for type inference at the call site.

block

A suspend lambda applied to a StreamingResponseDefinitionBuilder.

Type Parameters

T

The type of data field in the ServerSentEventMetadata.