From 0f4a3549ec70f5799294a836dee3cadda2660852 Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期三, 20 十一月 2024 11:11:48 +0800
Subject: [PATCH] MOMIP改为可配置
---
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