1:上传文件实例 public void UploadXMLLog(string xmlpath) { NameValueCollection nvc = new NameValueCollection(); CookieContainer cookies = new CookieContainer(); nvc.Add("", ""); ...... …
// 调用接口上传文件 using (var client = new HttpClient()) { using (var multipartFormDataContent = new MultipartFormDataContent()) { var values = new[] { new KeyValuePair<string, string>("a", "3"), new KeyValuePair<string, string>(&…