Browse Source

打印日志

master
qian 3 months ago
parent
commit
9b4215c5ef
  1. 6
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/PostService/PostService.cs

6
WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/PostService/PostService.cs

@ -47,7 +47,9 @@ namespace Win_in.Sfs.Scp.WebApi.Agent
Serilog.Log.Information(url);
Serilog.Log.Debug(content);
var response = await client.PostAsync(url, httpContent);
Serilog.Log.Debug("输出响应内容");// 输出响应内容
Serilog.Log.Debug(response.ToString());// 输出响应内容
Console.WriteLine(response.ToString());
try
{
Log.Debug("before EnsureSuccessStatusCode() response content↓↓↓");
@ -64,6 +66,8 @@ namespace Win_in.Sfs.Scp.WebApi.Agent
HttpContent respCon = response.Content;
string resultContent = await respCon.ReadAsStringAsync();
Serilog.Log.Debug(resultContent.ToString());
Console.WriteLine(resultContent.ToString());
resultContent = resultContent.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", "");
Serilog.Log.Debug("response content↓↓↓");

Loading…
Cancel
Save