首页 > Web开发 > 详细

RestSharp .net 轻量级rest客户端

时间:2015-10-09 12:03:11      阅读:291      评论:0      收藏:0      [点我收藏+]

RestSharp

Simple REST and HTTP API Client for .NET

官网:http://restsharp.org/

GiHub:

https://github.com/restsharp/RestSharp

 

慢牛系列一:如何抓取股票数据

 

天气预报全能版

http://www.apix.cn/services/show/89

var client = new RestClient("http://a.apix.cn/heweather/x3/pro/weather?cityid=your_value");
var request = new RestRequest(Method.GET);
request.AddHeader("apix-key", "您的apix-key");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "application/json");
IRestResponse response = client.Execute(request);

 

技术分享

 

RestSharp .net 轻量级rest客户端

原文:http://www.cnblogs.com/wangjunwei/p/4863151.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!