From 902978daa7fc7cdeee96a94bb77e075a377ba370 Mon Sep 17 00:00:00 2001 From: liwenhai <340416478@qq.com> Date: Wed, 15 Feb 2023 15:38:18 +0800 Subject: [PATCH] Update HttpHelper.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 设置超时时间为5分钟 --- QuartzNetAPI/Host/Common/HttpHelper.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/QuartzNetAPI/Host/Common/HttpHelper.cs b/QuartzNetAPI/Host/Common/HttpHelper.cs index e432aaa..0437a7f 100644 --- a/QuartzNetAPI/Host/Common/HttpHelper.cs +++ b/QuartzNetAPI/Host/Common/HttpHelper.cs @@ -58,6 +58,7 @@ public async Task PostAsync(string url, string jsonString, http.DefaultRequestHeaders.Remove(item.Key); http.DefaultRequestHeaders.TryAddWithoutValidation(item.Key, item.Value); } + http.Timeout = TimeSpan.FromMinutes(5); return await http.PostAsync(new Uri(url), content); } } @@ -98,6 +99,7 @@ public async Task GetAsync(string url, Dictionary PutAsync(string url, string jsonString, D http.DefaultRequestHeaders.Remove(item.Key); http.DefaultRequestHeaders.TryAddWithoutValidation(item.Key, item.Value); } + http.Timeout = TimeSpan.FromMinutes(5); return await http.PutAsync(url, content); } } @@ -170,6 +173,7 @@ public async Task DeleteAsync(string url, Dictionary