com.hexagonkt.http.handlers.HttpController.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http_handlers Show documentation
Show all versions of http_handlers Show documentation
HTTP handlers used to apply many callbacks to HTTP calls.
package com.hexagonkt.http.handlers
import com.hexagonkt.handlers.Context
import com.hexagonkt.http.model.HttpCall
/**
* Utility to encapsulate a handler in a class. TODO
*/
interface HttpController : HttpHandler {
val handler: HttpHandler
override val handlerPredicate: HttpPredicate
get() = handler.handlerPredicate
override fun addPrefix(prefix: String): HttpHandler =
handler.addPrefix(prefix)
override fun process(context: Context): Context =
handler.process(context)
override val predicate: (Context) -> Boolean
get() = handler.predicate
override val callback: (Context) -> Context
get() = handler.callback
}