using Atomx.Admin.Client.Services;

namespace Atomx.Admin.Client.Utils
{
    public static class HttpClientExtension
    {
        public static void AddHttpClientApiService(this IServiceCollection services, string baseAddress)
        {
            services.AddHttpClient<HttpService>(client =>
            {
                client.BaseAddress = new Uri(baseAddress);
                client.DefaultRequestHeaders.Add("Accept", "application/json");

            }).AddHttpMessageHandler<AuthHeaderHandler>();

            //services.AddHttpClient<AdminLoginLogService>(client => client.BaseAddress = new Uri(baseAddress));
            //services.AddHttpClient<AdminService>(client => client.BaseAddress = new Uri(baseAddress));
        }
    }
}
