RestSharp .net 轻量级rest客户端

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

 

 

posted @ 2015-10-09 10:27  高山-景行  阅读(1132)  评论(0编辑  收藏  举报