I use the Freya web stack to create a REST API and am having trouble defining a URI template for the route.
I defined a Uri template that looks like this:
"/{store}/{partition}{?date}"
The Freya router now matches this Uri pattern with the following URLs:
http://localhost/a/1?date=2015 http://localhost/b/3?date=2013
However, if I omit the query string, the Uri pattern no longer matches the URL. For example, the following URLs do not match the pattern:
http://localhost/a/1 http://localhost/b/3
How to define a Uri pattern using Freya with optional query string parameters?
Any help is greatly appreciated, thanks in advance.
source share