Collects the common data structures useful for request routing, including the router builders, as well as the routers themselves.
The prefix path under which the resources should be served (in the example above:
/api
).
Includes the Naptime resources into Play's dev mode not-found handler that lists all routes.
Includes the Naptime resources into Play's dev mode not-found handler that lists all routes.
Route the request to one of the naptime resources, invoking the (macro-generated) router.
Route the request to one of the naptime resources, invoking the (macro-generated) router.
The request to route.
If this is a naptime request for one of the routers, return the handler, otherwise None
Defer to handlerFor instead of the other way around for performance reasons.
Defer to handlerFor instead of the other way around for performance reasons.
It is better to have the true implementation in handlerFor
where we can route a request once
than to implement the partial function here, and have handlerFor call isDefinedAt and then
apply, which would result in request routing and URL parsing occuring twice for a single
request when it wouldn't need to.
Handles routing for Naptime resources in an idiomatic fashion for Play projects.
To use this router, include in your routes file something like:
Requests matching the prefix for naptime resources will then be routed appropriately.
Collects the common data structures useful for request routing, including the router builders, as well as the routers themselves.
The prefix path under which the resources should be served (in the example above:
/api
).