[OperationContract(Name="sayHelloJson")]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "sayHello", BodyStyle = WebMessageBodyStyle.Wrapped)]
String sayHello();
[OperationContract(Name = "SendMessageJson")]
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, UriTemplate = "SendMessage/{Message}", BodyStyle = WebMessageBodyStyle.Wrapped)]
String SendMessage(String Message);
比如说第一个不带参数的:http://localhost:8000/Service/Json/sayHello
那么第二个带参数的应该怎么调用?(比如说参数是"abc")
我指的是在浏览器中或java的httpclient中,因为我准备在android上实现客户端,所以.net的调用方式就不必讲了。
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "sayHello", BodyStyle = WebMessageBodyStyle.Wrapped)]
String sayHello();
[OperationContract(Name = "SendMessageJson")]
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, UriTemplate = "SendMessage/{Message}", BodyStyle = WebMessageBodyStyle.Wrapped)]
String SendMessage(String Message);
比如说第一个不带参数的:http://localhost:8000/Service/Json/sayHello
那么第二个带参数的应该怎么调用?(比如说参数是"abc")
我指的是在浏览器中或java的httpclient中,因为我准备在android上实现客户端,所以.net的调用方式就不必讲了。
解决方案 »
- C#调用C++ DLL的问题,一些类型如何对应?
- C#中关于DataGridView显示数据后下面没有水平滚动条的问题?
- C# 取Windows XP 用户名??
- 注册用户的验证有没有高效点的方法啊!!
- 前一视图/后一视图
- 腾迅QQ的一道上机测试题:写一正则表达式,排除数字以外的所有一切字符(包括回车换行,空格等)
- 关于去掉不想要的字符!!!!!!!!!
- C#学习群 13822746,真诚欢迎爱好c#的朋友加入!
- 高级问题:控件中的按钮如何控制 使用该控件的程序的form打开或关闭?
- 一个有趣的智商题,考考大家?送分
- 在进程A中创建另一个进程B,A和B都是对话框,都具有在最上层的属性,怎么在A创建了B以后,让输入焦点回到A上来?
- 两窗体间发送DataTable
http://localhost:8000/Service/Json/SendMessage?Message=parameter