Abstract Response Definition
abstract class AbstractResponseDefinition<T>(val contentType: ContentType, val httpStatus: HttpStatusCode = HttpStatusCode.OK, val headers: ResponseHeaders.() -> Unit? = null, val delay: Duration = Duration.ZERO)(source)
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.
Author
Konstantin Pavlov
Type Parameters
T
The type of the response data.
Inheritors
Constructors
Link copied to clipboard
constructor(contentType: ContentType, httpStatus: HttpStatusCode = HttpStatusCode.OK, headers: ResponseHeaders.() -> Unit? = null, delay: Duration = Duration.ZERO)