debug-proxy-pass (Day-Helper-2025-09-08)
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user