消费在基于.Net的REST Web服务 [英] Consuming REST based web services in .Net
问题描述
问候,
我很困惑,与.net消费基于REST的Web服务时做出最好的办法。目前我使用的System.net.webclient类。我应该使用WebResponse类,WebRequest的类System.Net?
I'm confused as to the best approach to make when consuming REST based web services with .Net. At the moment I'm using the System.net.webclient class. Should I be using Webresponse, webrequest classes in System.Net ?
如果我是用另一种方法(除了Web客户端),我将获得什么样的缺点/优点?
If I were to use another approach (Other than webclient) what disadvantages / advantages would I gain ?
谢谢
推荐答案
如果您使用的 WCF REST的入门套件,有pretty的多少无技术的缺点。有一个学习曲线,但是,它只会工作,如果你有.NET 3.5 SP1(所以我想这是不利的一面)。
If you use the WCF REST starter kit, there's pretty much no technical downside. There's a learning curve, however, and it will only work if you have .Net 3.5 SP1 (so I guess that's the down side).
这篇关于消费在基于.Net的REST Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!