简体   繁体   English

为基于休息的服务创建ac#包装器

[英]create a c# wrapper for rest based service

How does one go about creating ac# wrapper for rest based service. 如何为基于休息的服务创建ac#包装器。

I want to access the rest based API at Www.zomato.com inside my Silverlight app. 我想在我的Silverlight应用程序中的Www.zomato.com上访问基于其余部分的API。

Any guidance is appreciated. 任何指导表示赞赏。

I would take a look at some examples, there are numerous ones out in the wild. 我来看一些例子,有很多例子。 The following is a great example for twilio's rest api; 以下是twilio的 rest api的一个很好的例子; it leverages RestSharp under the covers. 它利用了RestSharp的后台功能 RestSharp is a great libary (available via nuget) to help out with the heavy lifting of interacting with a web api. RestSharp是一个很棒的库(可通过nuget获得),可以帮助您减轻与Web api交互的负担。

Note: Microsoft is coming out with a richer HttpClient option in .net 4.5; 注意:Microsoft在.net 4.5中推出了更丰富的HttpClient选项。 in fact, you can get it now via nuget. 实际上,您现在可以通过nuget获取它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM