Routing
Exact Routes
server.get("/health", ctx -> ctx.text("OK"));
Exact routes should be checked before dynamic routes.
Dynamic Routes
server.get("/users/{id}", ctx -> ctx.text(ctx.pathParam("id")));
Route params are extracted by segment. Regex route matching is not part of the v1 design.
Matching Order
- Fast exact routes.
- Normal exact routes.
- Dynamic routes.
- 404.
- 405 when another method matches the path.