How to send email address as parameter in wcf method
This is my operation contract. I want to test this method in a browser. But when I type any email in the browser like http://localhost:1234/json/user/abc/abc@abc.com
, it does not work
[OperationContract]
[WebInvoke(Method = "GET",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped,
UriTemplate = "json/user/{name}/{email}")]
string addUser(string name, string email);
How do I send the email 开发者_如何学运维address as a single string?? any idea?
Try to URL encode your e-mail address:
http://localhost:1234/json/user/abc/abc%40abc.com
Does that result in the call you expect?
精彩评论