27 lines
898 B
C#
27 lines
898 B
C#
using Furion;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace YB.DeviceV2.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
|
|
})
|
|
;
|
|
});
|
|
}
|
|
}
|
|
} |