constructor method can not be async. you can start an async/task process, but you can not await it.
as the service calls should all be async. there is an easy fix. provide an async GetHttpclient() routine use instead of using _httpClient directly
private bool GetHttpClientInit = false;
private async Task<HttpClient> GetHttpClient()
{
if (! GetHttpClientInit)
{
_httpClient.DefaultRequestHeaders.Add("param1", await _localStorageService.GetItemAsync<string>("param1");
_httpClient.DefaultRequestHeaders.Add("param2", await _localStorageService.GetItemAsync<string>("param2");
GetHttpClientInit = true;
}
return _httpClient;
}