Register `HttpClient` in the necessary modules.

Resolve #14998
pull/15001/head
maliming 3 years ago
parent e83c25fbb9
commit 3e05ed735f
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4

@ -1,4 +1,5 @@
using Volo.Abp.AspNetCore.Authentication.OAuth;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Authentication.OAuth;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.RemoteServices;
@ -12,5 +13,8 @@ namespace Volo.Abp.AspNetCore.Authentication.OpenIdConnect;
)]
public class AbpAspNetCoreAuthenticationOpenIdConnectModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClient();
}
}

@ -26,6 +26,7 @@ public class AbpAspNetCoreComponentsServerModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClient();
var serverSideBlazorBuilder = context.Services.AddServerSideBlazor(options =>
{
if (context.Services.GetHostingEnvironment().IsDevelopment())

@ -35,6 +35,7 @@ public class AbpAspNetCoreComponentsWebAssemblyModule : AbpModule
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClient();
context.Services
.GetHostBuilder().Logging
.AddProvider(new AbpExceptionHandlingLoggerProvider(context.Services));

@ -23,6 +23,7 @@ public class AbpHttpClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClient();
context.Services.AddTransient(typeof(DynamicHttpProxyInterceptorClientProxy<>));
}
}

Loading…
Cancel
Save