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

wcf rest怎么包装多参数?求!

热度:446   发布时间:2013-01-08 14:02:13.0
wcf rest怎样包装多参数?急求!!!
服务是使用wcf rest模板,请问怎样包装多个参数???
例如:我写了以下这个简单的例子:

[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 吗?