!24 post方法增加请求超时配置

Merge pull request !24 from xbzhu/N/A
This commit is contained in:
字母搬运工 2023-02-15 13:28:04 +00:00 committed by Gitee
commit 47c3e41eb1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
@ -22,6 +22,7 @@ namespace Infrastructure
postData = postData ?? "";
using (HttpClient client = new HttpClient())
{
client.Timeout = new TimeSpan(0, 0, timeOut);
if (headers != null)
{
foreach (var header in headers)