HttpClientBuilderExtensions.RemoveAsKeyed(IHttpClientBuilder) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes the keyed registrations for the named HttpClient and HttpMessageHandler.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ RemoveAsKeyed(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder RemoveAsKeyed (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder);
static member RemoveAsKeyed : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function RemoveAsKeyed (builder As IHttpClientBuilder) As IHttpClientBuilder
Parameters
- builder
- IHttpClientBuilder
The IHttpClientBuilder.
Returns
An IHttpClientBuilder that can be used to configure the client.
Remarks
If used in conjuction with ConfigureHttpClientDefaults(IServiceCollection, Action<IHttpClientBuilder>), it will only affect the previous "global" AnyKey registration, and won't affect the clients registered for a specific name with AddAsKeyed(IHttpClientBuilder, ServiceLifetime).