Consuming REST based web services in .Net

2020-02-10 09:26发布

问题:

Greetings,

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 ?

If I were to use another approach (Other than webclient) what disadvantages / advantages would I gain ?

Thanks,

回答1:

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).



回答2:

You can also see this link if you want to do it without WCF.



标签: c# .net rest