HttpContext
data class HttpContext(val event: HttpCall, val predicate: (Context<HttpCall>) -> Boolean, val nextHandlers: List<Handler<HttpCall>> = emptyList(), val nextHandler: Int = 0, val exception: Exception? = null, val attributes: Map<*, *> = emptyMap<Any, Any>(), val handled: Boolean = false) : Context<HttpCall>
Constructors
Link copied to clipboard
constructor(request: HttpRequestPort = HttpRequest(), response: HttpResponsePort = HttpResponse(), predicate: HttpPredicate = HttpPredicate(), attributes: Map<*, *> = emptyMap<Any, Any>())
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
Functions
Link copied to clipboard
fun accepted(onConnect: WsSession.() -> Unit = {}, onBinary: WsSession.(data: ByteArray) -> Unit = {}, onText: WsSession.(text: String) -> Unit = {}, onPing: WsSession.(data: ByteArray) -> Unit = {}, onPong: WsSession.(data: ByteArray) -> Unit = {}, onClose: WsSession.(status: Int, reason: String) -> Unit = { _, _ -> }): HttpContext
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): HttpContext
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): HttpContext
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): HttpContext
Link copied to clipboard
fun found(location: String, headers: Headers = response.headers, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpContext
Link copied to clipboard
fun internalServerError(exception: Exception, headers: Headers = response.headers, attributes: Map<*, *> = this.attributes): HttpContext
fun internalServerError(body: Any = response.body, headers: Headers = response.headers, contentType: ContentType? = response.contentType, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpContext
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): HttpContext
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): HttpContext
Link copied to clipboard
fun receive(body: Any = request.body, headers: Headers = request.headers, contentType: ContentType? = request.contentType, accept: List<ContentType> = request.accept, cookies: List<Cookie> = request.cookies, attributes: Map<*, *> = this.attributes): HttpContext
Link copied to clipboard
fun redirect(status: HttpStatus, location: String, headers: Headers = response.headers, cookies: List<Cookie> = response.cookies, attributes: Map<*, *> = this.attributes): HttpContext
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): HttpContext
Link copied to clipboard
fun serverError(status: HttpStatus, exception: Exception, headers: Headers = response.headers, attributes: Map<*, *> = this.attributes): HttpContext
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): HttpContext