From 65f280ee9b3b998df59b59cff117624eefae157c Mon Sep 17 00:00:00 2001
From: 陈勇 <chenyong@hnkhzn.com>
Date: 星期四, 14 十一月 2024 09:49:56 +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