下面的代码用于使用restclient进行api调用...但是没有任何人对此有任何意见?
var client = new RestClient("http://www.sentiment140.com");
var request = new RestRequest(Method.POST);
request.Resource = "api/bulkClassifyJson";
request.AddParameter("appid", "abcd@gmail.com");
request.RequestFormat = DataFormat.Json;
request.AddBody(text);
var response = client.Execute(request);
var serializer = new JavaScriptSerializer();
List<Sentimental> items = serializer.Deserialize<List<Sentimental>>(response.Content);
return items;