Stream Response Definition
Represents a definition for streaming responses, supporting chunked data and flow-based content streaming. This class extends the base AbstractResponseDefinition to provide additional functionality specific to chunked or streamed responses. It can handle flow-based content delivery, manage chunk-wise delays, and supports various output formats such as OutputStream, Writer, or ServerSSESession.
Author
Konstantin Pavlov
Parameters
The type of the request body.
The type of the response data being streamed.
See also
Inheritors
Constructors
Initializes a streaming response definition with the specified flow, chunk list, content type, HTTP status code, and headers.
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.
The HTTP status code of the response as Int, defaulting to 200.
The optional response payload associated with this definition.