using Furion;
using Hinse.Health;
using Microsoft.Extensions.DependencyInjection;

namespace YBDevice.Body
{
    public class Startup : AppStartup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            var configuration = App.Configuration;
            services.AddRemoteRequest(options =>
            {
                //合泰八电极算法地址
                options.AddHttpClient("hetai", c =>
                {
                    c.BaseAddress = new Uri(configuration["BodyApiSettings:BaseUrl"]);
                })
                .ConfigurePrimaryHttpMessageHandler(u => new HttpClientHandler
                {
                    // 忽略 SSL 不安全检查，或 https 不安全或 https 证书有误
                    ServerCertificateCustomValidationCallback = (_, _, _, _) => true
                })
                ;
            });
            //增加健康算法库
            services.AddHealthService();
        }
    }
}