EasyText, EasyLicense 的作者, https://github.com/EasyHelper Good Good Study,Day Day Up.

 

摘要: 在上篇文章中我们封装了Rest请求,下面我将做一些demo给大家演示RestInvoker怎么使用。首先是服务契约代码:这里注意下CreateByIdAndName方法,因为有两个参数,所以bodyStyle选择wrappedRequest.也就是对Request进行Wrapped的意思。Wrapped的效果就是Json的格式会不一致。View Code [ServiceContract][ServiceKnownType(typeof(Product))]publicinterfaceIRestService{[OperationContract][WebGet(UriTemplate=&q 阅读全文
posted @ 2011-05-15 21:22 LoveJenny 阅读(2253) 评论(2) 推荐(2)
EasyText, EasyLicense 的作者, https://github.com/EasyHelper Good Good Study,Day Day Up.