HttpServerContext
data class HttpServerContext(val event: HttpServerCall, val predicate: (Context<HttpServerCall>) -> Boolean, val nextHandlers: List<Handler<HttpServerCall>> = emptyList(), val nextHandler: Int = 0, val exception: Exception? = null, val attributes: Map<*, *> = emptyMap<Any, Any>()) : Context<HttpServerCall>
Constructors
Link copied to clipboard
constructor(request: HttpServerRequestPort = HttpServerRequest(), response: HttpServerResponse = HttpServerResponse(), predicate: HttpServerPredicate = HttpServerPredicate(), attributes: Map<*, *> = emptyMap<Any, Any>())
constructor(event: HttpServerCall, predicate: (Context<HttpServerCall>) -> Boolean, nextHandlers: List<Handler<HttpServerCall>> = emptyList(), nextHandler: Int = 0, exception: Exception? = null, attributes: Map<*, *> = emptyMap<Any, Any>())
Functions
Link copied to clipboard
fun accepted(onConnect: WsServerSession.() -> Unit = {}, onBinary: WsServerSession.(data: ByteArray) -> Unit = {}, onText: WsServerSession.(text: String) -> Unit = {}, onPing: WsServerSession.(data: ByteArray) -> Unit = {}, onPong: WsServerSession.(data: ByteArray) -> Unit = {}, onClose: WsServerSession.(status: WsCloseStatus, reason: String) -> Unit = { _, _ -> }): HttpServerContext
Link copied to clipboard
fun badRequest(body: Any = response.body, headers: Headers = response.headers, contentType: ContentType? = response.contentType, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpServerContext
Link copied to clipboard
fun created(body: Any = response.body, headers: Headers = response.headers, contentType: ContentType? = response.contentType, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpServerContext
Link copied to clipboard
fun forbidden(body: Any = response.body, headers: Headers = response.headers, contentType: ContentType? = response.contentType, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpServerContext
Link copied to clipboard
fun internalServerError(exception: Exception, headers: Headers = response.headers, attributes: Map<*, *> = this.attributes): HttpServerContext
fun internalServerError(body: Any = response.body, headers: Headers = response.headers, contentType: ContentType? = response.contentType, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpServerContext
Link copied to clipboard
Link copied to clipboard
fun notFound(body: Any = response.body, headers: Headers = response.headers, contentType: ContentType? = response.contentType, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpServerContext
Link copied to clipboard
fun ok(body: Any = response.body, headers: Headers = response.headers, contentType: ContentType? = response.contentType, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpServerContext
Link copied to clipboard
fun send(status: HttpStatus = response.status, body: Any = response.body, headers: Headers = response.headers, contentType: ContentType? = response.contentType, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpServerContext
Link copied to clipboard
fun serverError(status: HttpStatus, exception: Exception, headers: Headers = response.headers, attributes: Map<*, *> = this.attributes): HttpServerContext
Link copied to clipboard
Link copied to clipboard
fun unauthorized(body: Any = response.body, headers: Headers = response.headers, contentType: ContentType? = response.contentType, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpServerContext
Link copied to clipboard
open override fun with(event: HttpServerCall, predicate: (Context<HttpServerCall>) -> Boolean, nextHandlers: List<Handler<HttpServerCall>>, nextHandler: Int, exception: Exception?, attributes: Map<*, *>): Context<HttpServerCall>
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard