Share via


HttpClientBuilderExtensions.RemoveAsKeyed(IHttpClientBuilder) Method

Definition

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

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).

Applies to