From 796012675fe75e13e082ae4f540d1b87175c0a1d Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期二, 19 十一月 2024 09:41:26 +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