From 7859c33c5b86f51dcdf9ad17c1c511bfe3511ae3 Mon Sep 17 00:00:00 2001 From: 陈勇 <chenyong@hnkhzn.com> Date: 星期二, 19 十一月 2024 09:02:15 +0800 Subject: [PATCH] 忽略项 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs index 91d5f89..d6982b4 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Net.Http.Headers; +using System.Security.Policy; using System.Text; using System.Threading.Tasks; @@ -9,13 +10,16 @@ { public class HttpHelper { - public static async Task<string> GetAsync(string serviceAddress, string contentType = "application/json", Dictionary<string, string>? headers = null) + public static async Task<string> GetAsync(string serviceAddress, Dictionary<string, object> parameters, string contentType = "application/json", Dictionary<string, string>? headers = null) { try { string result = string.Empty; using HttpClient httpClient = new HttpClient(); httpClient.Timeout = new TimeSpan(0, 0, 60); + // 灏嗗弬鏁版嫾鎺ュ埌URL涓� + string queryString = string.Join("&", parameters.Select(x => $"{x.Key}={x.Value}")); + serviceAddress += "?" + queryString; if (headers != null) { -- Gitblit v1.9.3