Enabled inheritance access to ApiService methods

This commit is contained in:
Casper Sparre 2026-02-19 19:58:34 +01:00
parent 6054d3b6a2
commit 8603239f86

View File

@ -2772,12 +2772,12 @@ public class ApiService(IAuthService authService, IConfigService configService,
}
private async Task<string?> BuildHeaderAndExecuteRequests(Dictionary<string, string> getParams, string endpoint,
protected async Task<string?> BuildHeaderAndExecuteRequests(Dictionary<string, string> getParams, string endpoint,
HttpClient client)
{
Log.Debug("Calling BuildHeaderAndExecuteRequests");
HttpRequestMessage request = await BuildHttpRequestMessage(getParams, endpoint);
HttpRequestMessage request = await BuildHttpRequestMessage(getParams, endpoint, method);
using HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
string body = await response.Content.ReadAsStringAsync();
@ -2821,7 +2821,7 @@ public class ApiService(IAuthService authService, IConfigService configService,
private static bool IsStringOnlyDigits(string input) => input.All(char.IsDigit);
private HttpClient GetHttpClient()
protected HttpClient GetHttpClient()
{
HttpClient client = new();
if (configService.CurrentConfig.Timeout is > 0)
@ -2832,7 +2832,7 @@ public class ApiService(IAuthService authService, IConfigService configService,
return client;
}
private static T? DeserializeJson<T>(string? body, JsonSerializerSettings? settings = null)
protected static T? DeserializeJson<T>(string? body, JsonSerializerSettings? settings = null)
{
if (string.IsNullOrWhiteSpace(body))
{