Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
  • Loading branch information
my6521 committed May 9, 2024
1 parent 41c3009 commit 8aa070f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/WWB.Paylink.BaoFooTransfer/BaoFooTransClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System;
using System.Net.Http;
using System.Threading.Tasks;
Expand Down Expand Up @@ -37,6 +38,8 @@ public async Task<T> ExecuteAsync<T>(IBaoFooTransRequest<T> request, BaoFooTrans
//提交
using (var client = _httpClientFactory.CreateClient(Name))
{
_logger.LogInformation($"请求参数:{JsonConvert.SerializeObject(txtParams)}");

var (body, isSuccessStatusCode) = await client.PostAsync(url, contentType, txtParams);
if (isSuccessStatusCode)
{
Expand All @@ -54,7 +57,7 @@ public async Task<T> ExecuteAsync<T>(IBaoFooTransRequest<T> request, BaoFooTrans
}
else
{
throw new BaoFooTransException($"请求错误");
throw new BaoFooTransException($"请求错误 {body}");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<PackageId>WWB.Paylink.BaoFooTransfer</PackageId>
<Version>1.0.10</Version>
<Version>1.0.11</Version>
<Authors>my6521</Authors>
<Description>宝付代付SDK。</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down

0 comments on commit 8aa070f

Please sign in to comment.