MatchingHandler

data class MatchingHandler(httpHandler: HttpHandler, val description: RouterDescription, val subMatches: List<RouterMatch> = listOf()) : RouterMatch, Function1<request: Request, Response>

Constructors

Link copied to clipboard
constructor(httpHandler: HttpHandler, description: RouterDescription, subMatches: List<RouterMatch> = listOf())

Properties

Link copied to clipboard
open override val description: RouterDescription
Link copied to clipboard
open override val subMatches: List<RouterMatch>

Functions

Link copied to clipboard
open override fun aggregatedBy(description: RouterDescription, fromMatches: List<RouterMatch>): RouterMatch
Link copied to clipboard
fun Events.and(next: Events): Events
Link copied to clipboard
fun (Request) -> Boolean.asRouter(description: String = unavailable.description): Router

Convert any predicate on a request into a router

Link copied to clipboard
Link copied to clipboard
open operator override fun compareTo(other: RouterMatch): Int
Link copied to clipboard
fun HttpHandler.debug(out: PrintStream = System.out, debugStream: Boolean = false): (request: Request) -> Response
Link copied to clipboard
open operator override fun invoke(request: Request): Response
Link copied to clipboard
fun RouterMatch.prettify(depth: Int = 0, escape: EscapeMode = Ansi): String
Link copied to clipboard
fun Events.then(next: Events): (Event) -> Unit
Link copied to clipboard

Convert a synchronous HttpHandler API to mimic AsyncHttpClient