当前位置: 代码迷 >> Web Service >> wcf rest怎样包装多参数?求!该如何处理
  详细解决方案

wcf rest怎样包装多参数?求!该如何处理

热度:642   发布时间:2012-01-11 22:28:46.0
wcf rest怎样包装多参数?急求!!!
服务是使用wcf rest模板,请问怎样包装多个参数???
例如:我写了以下这个简单的例子:
C# code

[WebInvoke(Method = "POST", UriTemplate = "f", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
        public bool F(int id, bool b)
        {
            return b;
        }


然后在fiddler下测试,输入json: {"id":1,"b":true}
结果杯具,400错误,但help页面能打开,只是里面无法确定请求。。。
求高人解答

------解决方案--------------------
你请求的url 是 http://xxxx/f 吗?