All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hexagonkt.http.handlers.HttpController.kt Maven / Gradle / Ivy

There is a newer version: 3.7.2
Show newest version
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
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy