Package-level declarations

Types

Link copied to clipboard
abstract class AbstractResponseDefinition<T>(val contentType: <Error class: unknown class>? = null, val httpStatus: <Error class: unknown class> = HttpStatusCode.OK, val headers: <Error class: unknown class>.() -> Unit? = null, val headerList: List<<Error class: unknown class><String, String>> = emptyList(), val delay: <Error class: unknown class> = Duration.ZERO)

Represents the base definition of an HTTP response in a mapping between a request and its corresponding response. Provides the required attributes and behavior for configuring HTTP responses, including status code, headers, and content type. This class serves as the foundation for more specialized response definitions.

Link copied to clipboard
abstract class AbstractResponseDefinitionBuilder<P, T>(var httpStatus: <Error class: unknown class>, val headers: MutableList<<Error class: unknown class><String, String>>, var delay: <Error class: unknown class> = Duration.ZERO)

Represents a base abstraction for defining the attributes of an HTTP response in the context of request-to-response mappings. This class allows customization of the HTTP status code and headers and provides a mechanism for building concrete response definitions.

Link copied to clipboard
open class ResponseDefinition<P, T>(contentType: <Error class: unknown class> = ContentType.Application.Json, val body: T? = null, httpStatus: <Error class: unknown class> = HttpStatusCode.OK, headers: <Error class: unknown class>.() -> Unit? = null, headerList: List<<Error class: unknown class><String, String>> = emptyList<Pair<String, String>>(), delay: <Error class: unknown class>) : AbstractResponseDefinition<T>

Represents a concrete implementation of an HTTP response definition with a specific response body. This class builds on the AbstractResponseDefinition to provide additional configuration and behavior.

Link copied to clipboard
open class ResponseDefinitionBuilder<P : Any, T : Any>(val request: CapturedRequest<P>, var contentType: <Error class: unknown class>? = null, var body: T? = null, httpStatus: <Error class: unknown class> = HttpStatusCode.OK, headers: MutableList<<Error class: unknown class><String, String>> = mutableListOf()) : AbstractResponseDefinitionBuilder<P, T>

Builder for constructing a definition of an HTTP response with configurable attributes.

Link copied to clipboard
open class SseStreamResponseDefinition<P>(val chunkFlow: <Error class: unknown class><<Error class: unknown class>>? = null, delay: <Error class: unknown class> = Duration.ZERO) : StreamResponseDefinition<P, <Error class: unknown class>>
Link copied to clipboard
open class StreamingResponseDefinitionBuilder<P : Any, T>(val request: CapturedRequest<P>, var flow: <Error class: unknown class><T>? = null, var chunks: MutableList<T> = mutableListOf(), var delayBetweenChunks: <Error class: unknown class> = Duration.ZERO, httpStatus: <Error class: unknown class> = HttpStatusCode.OK, headers: MutableList<<Error class: unknown class><String, String>> = mutableListOf()) : AbstractResponseDefinitionBuilder<P, T>

A builder for constructing streaming response definitions.

Link copied to clipboard
open class StreamResponseDefinition<P, T>(val chunkFlow: <Error class: unknown class><T>? = null, val chunks: List<T>? = null, val delayBetweenChunks: <Error class: unknown class> = Duration.ZERO, contentType: <Error class: unknown class> = ContentType.Text.EventStream.withCharset(Charsets.UTF_8), httpStatus: <Error class: unknown class> = HttpStatusCode.OK, headers: <Error class: unknown class>.() -> Unit? = null, headerList: List<<Error class: unknown class><String, String>> = emptyList<Pair<String, String>>(), delay: <Error class: unknown class>) : AbstractResponseDefinition<T>

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.