io.pedestal.http.route.map-tree

matching-route-map

(matching-route-map routes)

Given the full sequence of route-maps, return a single map, keyed by path, whose value is a function matching on the req. The function takes a request, matches criteria and constraints, and returns the most specific match. This function only processes the routes if all routes are static.

router

(router routes)

Given a sequence of routes, return a router function.

This router is fast, because it uses a hash table lookup based entirely on path; this only works because none of the routes may have path parameters.

If any of the routes do have path parameters, then prefix-tree/router is invoked to provide the router function.