Reputation: 754
I have a Spray rotue. For example:
val myRoute = (get & path("get_init_data")) {
???
} ~ (post & path("push")) {
???
}
Is it possible to extract all paths that are defined in the route? I need to extract paths names and paths methods.
Upvotes: 1
Views: 75
Reputation: 6237
The answer is no: spray routes are just functions from RequestContext
to Unit
and thus they are opaque. You are looking for something that is more common in more web-oriented frameworks.
Upvotes: 1