v3.0 Upgrade to .net9.0

This commit is contained in:
2025-01-16 20:55:24 +01:00
parent 318598f62a
commit 73c19a3f8f
6 changed files with 19 additions and 16 deletions

View File

@ -38,10 +38,10 @@ public static class ApiHttpClient
HttpClient httpClient = new();
HttpResponseMessage response = httpClient.Send(request);
logger?.Log(!response.IsSuccessStatusCode ? LogLevel.Error : LogLevel.Debug, string.Join("\n\t",
"Request:",
"Response:",
$"\u251c\u2500\u2500 URI: {request.RequestUri}",
$"\u251c\u2500\u2510 Headers: {string.Concat(response.Headers.Select(h => $"\n\t\u2502 {(response.Headers.Last().Key.Equals(h.Key) ? "\u2514" : "\u251c")} {h.Key}: {string.Join(", ", h.Value)}"))}",
$"\u2514\u2500\u2500 Content: {response.Content?.ReadAsStringAsync().Result}"));
$"\u2514\u2500\u2500 Content: {response.Content.ReadAsStringAsync().Result}"));
httpClient.Dispose();
return response;
}