Hello.
I'm having difficulties trying to figure (if possible) how to create an URL that also matches query parameters.
I tried:
<Route Url="/:namespace/test?(id)=:id" Method="GET" Call="Test"/>
<Route Url="/:namespace/test?id=:id" Method="GET" Call="Test"/></s></p>
But none of these worked.
Is it possible when using %CSP.REST or am I restricted to using route parameters?
Thank you.
EDIT:
Forget about the "id" parameter name. It's a bad sample: normally id are by definition, able to be hierarchically included in the URI.
Think on id as being something that's not hierarchical, like the sample below:
/users/1?fields=list,of,fields,i,want,to,show
This would force the URI to be designed in a way that can't be expressed by route paramers, since "fields" doesn't belong to users, as it's really abstract.
So let's consider the URLMap as:
<Route Url="/users/:id(\?fields\=):fields" Method="GET" Call="Test"/>
<Route Url="/users/:id?(fields)=:fields" Method="GET" Call="Test"/>
<Route Url="/users/:id?fields=:fields" Method="GET" Call="Test"/>