using AyCode.Core.Enums; using AyCode.Core.Loggers; using AyCode.Entities; using AyCode.Entities.LogItems; using AyCode.Interfaces.Entities; using static System.Net.WebRequestMethods; using System; namespace AyCode.Services.Loggers; public abstract class AcHttpClientLogItemWriter : AcLogItemWriterBase where TLogItem : class, IAcLogItemClient { protected HttpClient _httpClient; protected readonly HttpClientHandler _httpClientHandler; protected AcHttpClientLogItemWriter(HttpClient httpClient) : base(AppType.Web, LogLevel.Detail) { _httpClient = httpClient; } protected AcHttpClientLogItemWriter(string? categoryName = null) : base(categoryName) { _httpClientHandler = new HttpClientHandler(); _httpClient = new HttpClient(_httpClientHandler, false); } protected AcHttpClientLogItemWriter(AppType appType, LogLevel logLevel, string? categoryName = null) : base(appType, logLevel, categoryName) { _httpClientHandler = new HttpClientHandler(); _httpClient = new HttpClient(_httpClientHandler, false); } //protected override void WriteLogItem(TLogItem logItem, Action? callback = null) //{ // //throw new NotImplementedException(); // base.WriteLogItem(logItem, () => // { // //http.PostAsJson(url, Param); // //_httpClient.Send() // }); //} //protected override void WriteLogItem(TLogItem logItem, Action>? callback = null) //{ // throw new NotImplementedException(); // base.WriteLogItem(logItem, logItems => // { // //_httpClient.Send() // }); //} }