AbstractStreamingResponseSpecification

abstract class AbstractStreamingResponseSpecification<P : Any, T : Any, R : Any>(var responseFlow: Flow<T>?, var responseChunks: List<T>?, var delayBetweenChunks: Duration = Duration.ZERO, delay: Duration = Duration.ZERO) : AbstractResponseSpecification<P, R> , StreamingResponseSpecification<T> (source)

Type Parameters

P

The type of the request body.

T

The type of the chunk element.

R

The type of the response chunk.

Constructors

Link copied to clipboard
constructor(responseFlow: Flow<T>?, responseChunks: List<T>?, delayBetweenChunks: Duration = Duration.ZERO, delay: Duration = Duration.ZERO)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun chunks(chunks: List<T>)
open override fun chunks(vararg chunks: T)

Sets the chunks of content for the streaming response.

Link copied to clipboard
open override fun delayMillis(value: Long)

Sets the delay before sending the response, in milliseconds.

Link copied to clipboard
Link copied to clipboard
open override fun stream(stream: Stream<T>)