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

P

The type of the request payload.

T

The type of data field in the ServerSentEventMetadata.

block

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


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

T

The type of data field in the ServerSentEventMetadata.

responseType

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

block

A suspend lambda applied to a StreamingResponseDefinitionBuilder.