Dario,

it looks like the `PathMatcher::repeat` modifier is what you are looking 
for:
https://github.com/akka/akka/blob/release-2.3-dev/akka-http/src/main/scala/akka/http/server/PathMatcher.scala#L62

So, for example `Segment.repeat(maxIterations = 10, separator = Slash)` 
should be what you want.
Note that there is also an open ticket related to this: 
https://github.com/akka/akka/issues/16833

Cheers,
Mathias


On Monday, February 9, 2015 at 12:25:06 AM UTC+1, Dario Rexin wrote:
>
> Hi *,
>
> I am currently playing around with akka-http and so far I like it very 
> much. I am trying to rebuild an existing API and to do so I need to match 
> on URIs where there can be a variable number of segment between constant 
> parts.
>
> Example:
>
> /api/[...]/doSomething
>
> In the above example URI, the part between `api` and `doSomething` can 
> consist of a variable number of segments. In JAX-RS I could match it with
>
> @Path(/api/{segments:.+}/doSomething)
>
> Is there a builtin way to do this in akka-http, or do I have to use a 
> custom matcher?
>
> Cheers,
> Dario
>

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to