1
huangxiaoqiang
2026-02-25 02a4fdd78cef9c7d2a26bfb9aa187179cf0baac3
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs
@@ -7,6 +7,7 @@
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.LogHelper;
namespace WIDESEAWCS_Core.Helper
{
@@ -78,11 +79,13 @@
                    }
                }
                string result = string.Empty;
                QuartzLogger.WriteLogToFile($"MOMAPI接口", $"请求地址:【{serviceAddress}】,请求时间【{DateTime.Now}】请求参数【{JsonConvert.SerializeObject(requestJson)}】{Environment.NewLine}{Environment.NewLine}");
                using (HttpContent httpContent = new StringContent(requestJson))
                {
                    httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");
                    using HttpClient httpClient = new HttpClient();
                    httpClient.Timeout = new TimeSpan(0, 0, 120);
                    httpClient.Timeout = new TimeSpan(0, 0, 360);
                    if (headers != null)
                    {
@@ -91,6 +94,7 @@
                    }
                    result = await httpClient.PostAsync(serviceAddress, httpContent).Result.Content.ReadAsStringAsync();
                }
                QuartzLogger.WriteLogToFile($"MOMAPI接口", $"请求地址:【{serviceAddress}】,返回时间【{DateTime.Now}】返回参数【{JsonConvert.SerializeObject(result)}】{Environment.NewLine}{Environment.NewLine}");
                return result;
            }
            catch (Exception e)