WCF系列之.net(4.0) 在网站使用Js调用Wcf Rest
摘要:
上一篇,我们介绍了如何使用JS去调用WCF。但实际开发中,各大网站的API都是REST风格,那我们也REST下,顺便用JS调用。废话不多说,我就把几个比较重要的代码贴下:接口:using System.ServiceModel;using System.ServiceModel.Web;[ServiceContract]public interface IproductService{ [WebGet(UriTemplate = "all", ResponseFormat = WebMessageFormat.Json)] //不设置这个 默认就是xml IEnumerab 阅读全文
posted @ 2013-02-28 13:34
~紫鱼~
阅读(2920)
评论(1)
推荐(1)
浙公网安备 33010602011771号