Builder

interface Builder

Builder for defining routes.

Functions

Link copied to clipboard
abstract fun add(routerHandler: RouterHandler): Router.Builder

Add the specified RouterHandler to the routes.

Link copied to clipboard
abstract fun build(): RouterHandler

Build the Router from the defined routes.

Link copied to clipboard
abstract fun DELETE(pattern: String, handler: ExchangeHandler): Router.Builder

Define a route for DELETE requests with the specified path pattern.

Link copied to clipboard
abstract fun GET(pattern: String, handler: ExchangeHandler): Router.Builder

Define a route for GET requests with the specified path pattern.

Link copied to clipboard
abstract fun HEAD(pattern: String, handler: ExchangeHandler): Router.Builder

Define a route for POST requests with the specified path pattern.

Link copied to clipboard
abstract fun OPTIONS(pattern: String, handler: ExchangeHandler): Router.Builder

Define a route for OPTIONS requests with the specified path pattern.

Link copied to clipboard
abstract fun PATCH(pattern: String, handler: ExchangeHandler): Router.Builder

Define a route for PATCH requests with the specified path pattern.

Link copied to clipboard
abstract fun POST(pattern: String, handler: ExchangeHandler): Router.Builder

Define a route for POST requests with the specified path pattern.

Link copied to clipboard
abstract fun PUT(pattern: String, handler: ExchangeHandler): Router.Builder

Define a route for PUT requests with the specified path pattern.