debug-proxy-pass (Day-Helper-2025-09-08)

This commit is contained in:
2025-09-08 17:30:38 -07:00
parent 6102da7266
commit 55aa7db97e
7 changed files with 395 additions and 11 deletions

View File

@ -235,12 +235,15 @@ internal static partial class Helper20250407 {
private static Review? GetJsonResponse(ILogger<Worker> logger, string fileName, string rootUniformResourceLocator, string format, TimeZoneInfo timeZoneInfo) {
Review? result;
string url;
Task<string> response;
HttpClient httpClient = new();
Task<HttpResponseMessage> httpResponseMessage;
string url = new(rootUniformResourceLocator.EndsWith('/') ?
$"{rootUniformResourceLocator[..^1]}/{fileName}" :
$"{rootUniformResourceLocator}/{fileName}");
if (rootUniformResourceLocator.EndsWith('/')) {
url = new($"{rootUniformResourceLocator[..^1]}/{fileName}");
} else {
url = new($"{rootUniformResourceLocator}/{fileName}");
}
httpResponseMessage = httpClient.GetAsync(rootUniformResourceLocator);
httpResponseMessage.Wait();
if (!httpResponseMessage.Result.IsSuccessStatusCode) {
@ -266,9 +269,11 @@ internal static partial class Helper20250407 {
} else {
response = httpResponseMessage.Result.Content.ReadAsStringAsync();
response.Wait();
result = string.IsNullOrEmpty(response.Result) ?
null :
JsonSerializer.Deserialize(response.Result, ReviewCommonSourceGenerationContext.Default.Review);
if (string.IsNullOrEmpty(response.Result)) {
result = null;
} else {
result = JsonSerializer.Deserialize(response.Result, ReviewCommonSourceGenerationContext.Default.Review);
}
}
}
}