That's a great point Chris. I was kicking around some ideas on having more extractors for url checking and extraction. I ran into an issue in some oauth work when trying to get a ref to the full url of the request and ended up just using the underlying httpServletRequest. I'll have some time this weekend to work on it.
In your case though you can use a built in extractor, regex's
Below is an example of how you might serve both
https://gist.github.com/743169Basically you can extract what ever format you want from a string with a regex in scala.
Nathan used to have some nice examples using a combination of Path, Seg, and regex's to do typesafe format checking extractors.
We are prob overdue for more of that kind of documentation. We've been trying to pull executable documentation examples into g8 templates. I've gotten enough questions about the json module that I should probably put together a g8 template for javascript based apis. I'll look into that this weekend.
Hope that helps :)