http4k / org.http4k.routing / Router


interface Router (source)

Provides matching of a Request to an HttpHandler which can service it.


Name Summary
match abstract fun match(request: Request): HttpHandler?
Attempt to supply an HttpHandler which can service the passed request.

Extension Functions

Name Summary
with fun <T> T.with(vararg modifiers: (T) -> T): T


Name Summary
ResourceLoading interface ResourceLoading : Router
A little convenience thunk to simplify implementing Router for resource loaders.
RoutingHttpHandler interface RoutingHttpHandler : Router, HttpHandler
Composite HttpHandler which can potentially service many different URL patterns. Should return a 404 Response if it cannot service a particular Request.