I'm sure I must be missing something here because I can't believe path
matching in Akka HTTP could be broken in the way it seems to be, because
it would be unusable for anything other than toy applications if it was:
I'm composing route handing from a top-level handler and sub-handlers
like this:
pathPrefix("root") {
concat(
pathPrefix("service1") { service1.route },
pathPrefix("service2") { service2.route }
)
}
where service1.route etc returns the sub-route for the associated
sub-tree. That works fine with a path of say "/root/service1", but it
*also* matches "/rootnotroot/service1", because pathPrefix() just
matches any arbitrary string prefix and not a full path segment. And if
I use path() instead of pathPrefix() it tries to match the entire
remaining path. What I'm looking for is something along the lines of
segment() where that fully matches just the next path segment and leaves
the remaining path to be matched by inner routes, but there doesn't seem
to be such a thing.
What am I missing?
Thanks,
--
Alan Burlison
--
--
Read the docs: http://akka.io/docs/
Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.