Package com.hexagonkt.http.server.model

Classes to model server HTTP messages (requests and responses). Built on top of the /http module.

Types

Link copied to clipboard
data class HttpServerCall(val request: HttpServerRequestPort = HttpServerRequest(), val response: HttpServerResponse = HttpServerResponse()) : HttpCall<HttpServerRequestPort, HttpServerResponse>
Link copied to clipboard
data class HttpServerRequest(    val method: HttpMethod = GET,     val protocol: HttpProtocol = HTTP,     val host: String = "localhost",     val port: Int = 80,     val path: String = "",     val queryParameters: HttpFields<QueryParameter> = HttpFields(),     val headers: HttpFields<Header> = HttpFields(),     val body: Any = "",     val parts: List<HttpPart> = emptyList(),     val formParameters: HttpFields<FormParameter> = HttpFields(),     val cookies: List<HttpCookie> = emptyList(),     val contentType: ContentType? = null,     val certificateChain: List<X509Certificate> = emptyList(),     val accept: List<ContentType> = emptyList(),     val contentLength: Long = -1L) : HttpServerRequestPort
Link copied to clipboard
interface HttpServerRequestPort : HttpRequest
Link copied to clipboard
data class HttpServerResponse(    val body: Any = "",     val headers: HttpFields<Header> = HttpFields(),     val contentType: ContentType? = null,     val cookies: List<HttpCookie> = emptyList(),     val status: HttpStatus = NOT_FOUND) : HttpResponse