What I am looking for is a way I can pass anything to a specific url so I can parse it myself.
Something like this :
[OperationContract]
[WebGet(UriTemplate = "/whatever/blabla/{query}", RequestFormat = WebMessageFormat.Xml)]
string AddRouteForUser(string query);
Afterwards I can parse query myself to have the values I need.
Is it possible ?
Is there a better way ?
Thanks
[Edit title]
One option would be to use query string params since by definition, they’re sort of an optional property bag of options tagged onto a query. That leaves the path to being an immutable identifier for your rest resource.
It’s hard to say though without sepcific knowledge of the data and the rest resources
EDIT:
QueryStrings can be optional.
See comment from Anand @ https://connect.microsoft.com/VisualStudio/feedback/details/451296/rest-wcf-uritemplate-optional-querystring-parameters
“You can get the desired effect by omitting the Query string from the UriTemplate on your WebGet or WebInvoke attribute, and using WebOperationContext.Current.IncomingRequest.UriTemplateMatch.QueryParameters”