RestClient POST

 

SSL:

ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;

 

var client = new RestClient(apihost);
var request = new RestRequest(Method.POST);
request.AddFile("Img", image1, "Img1");
request.AddParameter("UserName", "PCK");
IRestResponse response = client.Execute(request);

return response.Content;

posted @ 2015-10-15 09:43  ahuo  阅读(547)  评论(0编辑  收藏  举报