Получаю ошибку при вызове метода Post:
System.InvalidOperationException: 'Unable to resolve service for type 'System.Net.Http.HttpClient' while attempting to activate 'TgBotCore.Services.Post'.'
internal sealed class Post
{
private readonly HttpClient _client;
private readonly ITelegramBotClient _bot;
private readonly VkApi _api;
private readonly Vk _parser;
const string channelId = "@linkd_1";
public Post(ITelegramBotClient bot, HttpClient client, VkApi api, Vk parser)
{
_client = client;
_bot = bot;
_api = api;
_parser = parser;
}
public async Task SendPost(HttpClient client, ITelegramBotClient bot, VkApi api, Vk parser)
{..}
services.AddHttpClient<Post>();
services.AddSingleton<Post>();
Что может быть не так?