Router

object Router

Provides access to route functions and builder.

Types

Link copied to clipboard
interface Builder

Builder for defining routes.

Functions

Link copied to clipboard
fun nest(predicate: RequestPredicate, routerHandler: RouterHandler): RouterHandler

Create a nested RouterHandler using the specified RouterHandler when the specified RequestPredicate matches.

Link copied to clipboard

Create a Router.Builder to define routes.

fun route(predicate: RequestPredicate, handlerFunction: ExchangeHandler): RouterHandler

Create a RouterHandler invoking the specified ExchangeHandler when the specified RequestPredicate matches.