RestSharp使用

class Program { private readonly static string investRankingForAllUrl = "http://192.168.1.98:9000/"; private readonly static IRestClient _rForAllRestClient; static Program() { _rForAllRestClient = new RestClient(investRankingForAllUrl); } static void Main(string[] args) { var request = new RestRequest("api/Ranking/InvestRankingForAll", Method.GET).AddParameter("PageIndex", 1).AddParameter("PageSize", 20); var response = _rForAllRestClient.Execute(request); } }
posted @ 2016-06-08 16:25  zslm___  阅读(517)  评论(0编辑  收藏  举报