From 5cbf9d0d05f6f2357c71f4e585441fdb4fc51d89 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期五, 20 三月 2026 09:54:22 +0800
Subject: [PATCH] 优化海康下发任务加快,添加请求头
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
index 17ddab6..2eabbce 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
@@ -177,7 +177,17 @@
if (hIKROBOTTaskSubmit == null) throw new Exception("娴峰悍AGV浠诲姟瀹炰綋杞崲澶辫触");
var json = hIKROBOTTaskSubmit.Serialize();
#endregion
- string response = HttpHelper.Post(apiInfo.ApiAddress, hIKROBOTTaskSubmit.Serialize());
+ // 鍒涘缓Headers瀛楀吀
+ var headers = new Dictionary<string, string>
+ {
+ { "X-lr-request-id", DateTimeOffset.Now.ToUnixTimeSeconds().ToString() }
+ // 濡傛灉闇�瑕佸叾浠朒eader锛屽彲浠ョ户缁坊鍔�
+ // { "Content-Type", "application/json" }
+ };
+
+ // 浼犻�扝eaders鍙傛暟
+ string response = HttpHelper.Post(apiInfo.ApiAddress, hIKROBOTTaskSubmit.Serialize(), headers: headers);
+ //string response = HttpHelper.Post(apiInfo.ApiAddress, hIKROBOTTaskSubmit.Serialize());
hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>();
if (hIKROBOTReturn.code == "SUCCESS")
{
--
Gitblit v1.9.3