From e7639b1edab8ae2921b7f9545271dfadf1566d63 Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期五, 15 十一月 2024 14:18:39 +0800
Subject: [PATCH] 忽略项

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/HttpClient/HttpsClient.cs |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/HttpClient/HttpsClient.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/HttpClient/HttpsClient.cs
index 0800faf..571ea6a 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/HttpClient/HttpsClient.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/HttpClient/HttpsClient.cs
@@ -52,10 +52,15 @@
         using (HttpClient client = new HttpClient())
         {
             // 灏嗗弬鏁拌浆鎹负FormUrlEncodedContent
-            var content = new FormUrlEncodedContent(ConvertToKeyValuePairs(parameters));
+            string content = JsonConvert.SerializeObject(parameters);
 
-            // 鍙戦�丳OST璇锋眰骞惰幏鍙栧搷搴�
-            HttpResponseMessage response = await client.PostAsync(url, content);
+            var request = new HttpRequestMessage(HttpMethod.Post, url);
+
+            request.Content = new StringContent(content, Encoding.UTF8, "application/json");
+            //var content = new FormUrlEncodedContent(ConvertToKeyValuePairs(parameters));
+            //// 鍙戦�丳OST璇锋眰骞惰幏鍙栧搷搴�
+            //HttpResponseMessage response = await client.PostAsync(url, content);
+            HttpResponseMessage response = await client.SendAsync(request);
 
             // 纭繚鍝嶅簲鎴愬姛
             response.EnsureSuccessStatusCode();

--
Gitblit v1.9.3