ServerBuilder

class ServerBuilder(var handlers: List<HttpHandler> = emptyList())

Constructors

Link copied to clipboard
fun ServerBuilder(handlers: List<HttpHandler> = emptyList())

Functions

Link copied to clipboard
fun after(predicate: HttpServerPredicate = HttpServerPredicate(), callback: HttpCallback)
fun after(pattern: String, callback: HttpCallback)
fun after(method: HttpMethod, pattern: String = "", callback: HttpCallback)
fun after(methods: Set<HttpMethod> = emptySet(), pattern: String = "", exception: KClass<out Exception>? = null, status: HttpStatus? = null, callback: HttpCallback)
Link copied to clipboard
fun delete(pattern: String = "", callback: HttpCallback)
Link copied to clipboard
inline fun <T : Exception> exception(status: HttpStatus? = null, noinline callback: HttpExceptionCallback<T>)
fun <T : Exception> exception(exception: KClass<T>? = null, status: HttpStatus? = null, callback: HttpExceptionCallback<T>)
Link copied to clipboard
fun filter(predicate: HttpServerPredicate = HttpServerPredicate(), callback: HttpCallback)
fun filter(pattern: String, callback: HttpCallback)
fun filter(method: HttpMethod, pattern: String = "", callback: HttpCallback)
fun filter(methods: Set<HttpMethod> = emptySet(), pattern: String = "", exception: KClass<out Exception>? = null, status: HttpStatus? = null, callback: HttpCallback)
Link copied to clipboard
fun get(pattern: String = "", callback: HttpCallback)
Link copied to clipboard
fun head(pattern: String = "", callback: HttpCallback)
Link copied to clipboard
fun on(predicate: HttpServerPredicate = HttpServerPredicate(), callback: HttpCallback)
fun on(pattern: String, callback: HttpCallback)
fun on(method: HttpMethod, pattern: String = "", callback: HttpCallback)
fun on(methods: Set<HttpMethod> = emptySet(), pattern: String = "", exception: KClass<out Exception>? = null, status: HttpStatus? = null, callback: HttpCallback)
Link copied to clipboard
fun options(pattern: String = "", callback: HttpCallback)
Link copied to clipboard
fun patch(pattern: String = "", callback: HttpCallback)
Link copied to clipboard
fun path(pattern: String, pathHandler: PathHandler)
fun path(pattern: String, vararg pathHandlers: HttpHandler)
fun path(pattern: String, block: ServerBuilder.() -> Unit)
fun path(pattern: String, pathHandlers: List<HttpHandler>)
Link copied to clipboard
fun post(pattern: String = "", callback: HttpCallback)
Link copied to clipboard
fun put(pattern: String = "", callback: HttpCallback)
Link copied to clipboard
fun trace(pattern: String = "", callback: HttpCallback)
Link copied to clipboard
fun use(handler: HttpHandler)
Link copied to clipboard
fun ws(pattern: String = "", callback: HttpCallback)

Properties

Link copied to clipboard