How to set The UriTepmlate Attr like that:
/FunctionName?{json_data}
because the person who is working With this web service whats to call that way
for example: http://localhost/xxx/service/Func?{"x":"aaa","y":"bbb"}
I tried that
[OperationContract]
[WebGet(UriTemplate = "/Func?{request}",
BodyStyle = WebMessageBodyStyle.Bare,
ResponseFormat = WebMessageFormat.Json)]
Result Func(string request);
than I get that err:
The UriTemplate '/Func?{request}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value', where name is a simple literal. See the documentation for UriTemplate for more details. Parameter name: template
when I set that
[OperationContract]
[WebGet(UriTemplate = "/Func?request={request}",
BodyStyle = WebMessageBodyStyle.Bare,
ResponseFormat = WebMessageFormat.Json)]
Result Func(string request);
it is working fine but this is not what they want.