refit
refit copied to clipboard
[BUG] Bypass SSL verification dotnet core in Blazor WebAssembly?
In BlazorWasm, refit doesn't work
.AddRefitClient<INumerologyApi>()
.ConfigureHttpClient(client =>
{
client.BaseAddress = new Uri(config[ConfigNames.ApiBaseUrl]);
client.DefaultRequestHeaders.Add("User-Agent", "fullstackhero blazorwasm v22.10");
})
.ConfigurePrimaryHttpMessageHandler(() => new SocketsHttpHandler
{
SslOptions = new SslClientAuthenticationOptions
{
RemoteCertificateValidationCallback = (_, _, _, _) => true
}
})