It would be most useful if URITemplate were an extractor for obtaining variables' values from an otherwise expanded URI. Of course that being an extractor as scala's pattern matcher knows would be a great detail. While I'm willing to implement this I'm quite lost after diving into the code. If you can think of a way of implementing this, I can offer some of my work hours for getting it done.
Activity
teigen commentedon Sep 6, 2012
Thats a very cool idea.
If you go about implementing this you only really need to deal with this part of the code https://github.com/teigen/uri-template/blob/master/src/main/scala/URITemplate.scala#L49-127
Everything above is support for the 'expand("foo" := "bar")' syntax, and everything below is the parser.
Support for Level 1, 2 and 3 should be doable. You would have to write the reverse of https://github.com/teigen/uri-template/blob/master/src/main/scala/URITemplate.scala#L85.
Level 4 brings support for Lists and Maps as variables and value modifiers which will be a lot harder.