additional documentation

This commit is contained in:
sbwalker 2024-03-21 10:51:03 -04:00
parent ce14b9e43e
commit 8a696f6c52

View File

@ -247,6 +247,7 @@ namespace Microsoft.Extensions.DependencyInjection
}); });
} }
// register a named IHttpClientFactory
services.AddHttpClient("oqtane", (provider, client) => services.AddHttpClient("oqtane", (provider, client) =>
{ {
var httpContextAccessor = provider.GetRequiredService<IHttpContextAccessor>(); var httpContextAccessor = provider.GetRequiredService<IHttpContextAccessor>();
@ -261,7 +262,7 @@ namespace Microsoft.Extensions.DependencyInjection
} }
}); });
// IHttpClientFactory for calling remote services via RemoteServiceBase // IHttpClientFactory for calling remote services via RemoteServiceBase (not named = default)
services.AddHttpClient(); services.AddHttpClient();
return services; return services;