修改ESL DRAFT 下载

optimize
jianghaiqing 2 years ago
parent 4f15dfe8f5
commit 8b65c85793

@ -692,7 +692,10 @@ namespace Myshipping.Application
{ {
_logger.LogInformation("批次={no} 对应请求报文 request={res}", batchNo, JSON.Serialize(info)); _logger.LogInformation("批次={no} 对应请求报文 request={res}", batchNo, JSON.Serialize(info));
var res = await url.SetHttpMethod(HttpMethod.Post) var res = await url.OnClientCreating(client => {
// client 为 HttpClient 对象
client.Timeout = TimeSpan.FromMinutes(15); // 设置超时时间 15分钟
}).SetHttpMethod(HttpMethod.Post)
.SetBody(JSON.Serialize(info), "application/json") .SetBody(JSON.Serialize(info), "application/json")
.SetContentEncoding(Encoding.UTF8) .SetContentEncoding(Encoding.UTF8)
.PostAsync(); .PostAsync();
@ -741,7 +744,10 @@ namespace Myshipping.Application
{ {
_logger.LogInformation("批次={no} 对应请求报文 request={res}", batchNo, JSON.Serialize(info)); _logger.LogInformation("批次={no} 对应请求报文 request={res}", batchNo, JSON.Serialize(info));
var res = await url.SetHttpMethod(HttpMethod.Post) var res = await url.OnClientCreating(client => {
// client 为 HttpClient 对象
client.Timeout = TimeSpan.FromMinutes(15); // 设置超时时间 15分钟
}).SetHttpMethod(HttpMethod.Post)
.SetBody(JSON.Serialize(info), "application/json") .SetBody(JSON.Serialize(info), "application/json")
.SetContentEncoding(Encoding.UTF8) .SetContentEncoding(Encoding.UTF8)
.PostAsync(); .PostAsync();
@ -791,7 +797,10 @@ namespace Myshipping.Application
{ {
_logger.LogInformation("批次={no} 对应请求报文 request={res}", batchNo, JSON.Serialize(info)); _logger.LogInformation("批次={no} 对应请求报文 request={res}", batchNo, JSON.Serialize(info));
var res = await url.SetHttpMethod(HttpMethod.Post) var res = await url.OnClientCreating(client => {
// client 为 HttpClient 对象
client.Timeout = TimeSpan.FromMinutes(15); // 设置超时时间 15分钟
}).SetHttpMethod(HttpMethod.Post)
.SetBody(JSON.Serialize(info), "application/json") .SetBody(JSON.Serialize(info), "application/json")
.SetContentEncoding(Encoding.UTF8) .SetContentEncoding(Encoding.UTF8)
.PostAsync(); .PostAsync();

Loading…
Cancel
Save