1 implementation of IHttpClientBuilder
Microsoft.Extensions.Http (1)
DependencyInjection\DefaultHttpClientBuilder.cs (1)
9internal sealed class DefaultHttpClientBuilder : IHttpClientBuilder
268 references to IHttpClientBuilder
Aspire.Playground.Tests (1)
Infrastructure\DistributedApplicationExtensions.cs (1)
194public static HttpClient CreateHttpClient(this DistributedApplication app, string resourceName, string? endpointName, Action<IHttpClientBuilder> configure)
Microsoft.AspNetCore.HeaderPropagation (9)
DependencyInjection\HeaderPropagationHttpClientBuilderExtensions.cs (9)
10/// <see cref="IHttpClientBuilder"/> extension methods for <see cref="HeaderPropagationMiddleware"/> which propagates request headers to an <see cref="System.Net.Http.HttpClient"/>. 20/// <param name="builder">The <see cref="IHttpClientBuilder"/> to add the message handler to.</param> 21/// <returns>The <see cref="IHttpClientBuilder"/> so that additional calls can be chained.</returns> 22public static IHttpClientBuilder AddHeaderPropagation(this IHttpClientBuilder builder) 48/// <param name="builder">The <see cref="IHttpClientBuilder"/> to add the message handler to.</param> 50/// <returns>The <see cref="IHttpClientBuilder"/> so that additional calls can be chained.</returns> 51public static IHttpClientBuilder AddHeaderPropagation(this IHttpClientBuilder builder, Action<HeaderPropagationMessageHandlerOptions> configure)
Microsoft.AspNetCore.HeaderPropagation.Tests (1)
HeaderPropagationIntegrationTest.cs (1)
209var client = services.AddHttpClient("example.com", c => c.BaseAddress = new Uri("http://example.com"))
Microsoft.Extensions.Http (166)
DependencyInjection\HttpClientBuilderExtensions.cs (108)
18/// Extension methods for configuring an <see cref="IHttpClientBuilder"/>. 25/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 27/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 28public static IHttpClientBuilder ConfigureHttpClient(this IHttpClientBuilder builder, Action<HttpClient> configureClient) 41/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 43/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 48public static IHttpClientBuilder ConfigureHttpClient(this IHttpClientBuilder builder, Action<IServiceProvider, HttpClient> configureClient) 67/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 69/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 74public static IHttpClientBuilder AddHttpMessageHandler(this IHttpClientBuilder builder, Func<DelegatingHandler> configureHandler) 90/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 92/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 103public static IHttpClientBuilder AddHttpMessageHandler(this IHttpClientBuilder builder, Func<IServiceProvider, DelegatingHandler> configureHandler) 119/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 120/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 130public static IHttpClientBuilder AddHttpMessageHandler<THandler>(this IHttpClientBuilder builder) 147/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 149/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 154public static IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this IHttpClientBuilder builder, Func<HttpMessageHandler> configureHandler) 171/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 173/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 184public static IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this IHttpClientBuilder builder, Func<IServiceProvider, HttpMessageHandler> configureHandler) 201/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 202/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 212public static IHttpClientBuilder ConfigurePrimaryHttpMessageHandler<THandler>(this IHttpClientBuilder builder) 229/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 231/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 238public static IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this IHttpClientBuilder builder, Action<HttpMessageHandler, IServiceProvider> configureHandler) 255/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 257/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 259public static IHttpClientBuilder ConfigureHttpMessageHandlerBuilder(this IHttpClientBuilder builder, Action<HttpMessageHandlerBuilder> configureBuilder) 274/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 276/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 280/// <see cref="ConfigurePrimaryHttpMessageHandler(IHttpClientBuilder, Func{HttpMessageHandler})"/> or 281/// <see cref="UseSocketsHttpHandler(IHttpClientBuilder, Action{ISocketsHttpHandlerBuilder})"/>, then the passed <paramref name="configureHandler"/> 286public static IHttpClientBuilder UseSocketsHttpHandler(this IHttpClientBuilder builder, Action<SocketsHttpHandler, IServiceProvider>? configureHandler = null) 310/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 313/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 317/// <see cref="ConfigurePrimaryHttpMessageHandler(IHttpClientBuilder, Func{HttpMessageHandler})"/> or 318/// <see cref="UseSocketsHttpHandler(IHttpClientBuilder, Action{ISocketsHttpHandlerBuilder})"/>, then the configuration set on 324public static IHttpClientBuilder UseSocketsHttpHandler(this IHttpClientBuilder builder, Action<ISocketsHttpHandlerBuilder> configureBuilder) 337/// associated with the <see cref="IHttpClientBuilder"/>. 343/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 351/// Calling <see cref="HttpClientBuilderExtensions.AddTypedClient{TClient}(IHttpClientBuilder)"/> will register a typed 360public static IHttpClientBuilder AddTypedClient<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TClient>( 361this IHttpClientBuilder builder) 369internal static IHttpClientBuilder AddTypedClientCore<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TClient>( 370this IHttpClientBuilder builder, bool validateSingleType) 382private static TClient AddTransientHelper<TClient>(IServiceProvider s, IHttpClientBuilder builder) where TClient : class 393/// associated with the <see cref="IHttpClientBuilder"/>. The created instances will be of type 404/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 412/// Calling <see cref="HttpClientBuilderExtensions.AddTypedClient{TClient,TImplementation}(IHttpClientBuilder)"/> 422public static IHttpClientBuilder AddTypedClient<TClient, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TImplementation>( 423this IHttpClientBuilder builder) 432internal static IHttpClientBuilder AddTypedClientCore<TClient, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TImplementation>( 433this IHttpClientBuilder builder, bool validateSingleType) 446private static TClient AddTransientHelper<TClient, TImplementation>(IServiceProvider s, IHttpClientBuilder builder) where TClient : class where TImplementation : class, TClient 457/// associated with the <see cref="IHttpClientBuilder"/>. 463/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 472/// Calling <see cref="HttpClientBuilderExtensions.AddTypedClient{TClient}(IHttpClientBuilder,Func{HttpClient,TClient})"/> 476public static IHttpClientBuilder AddTypedClient<TClient>(this IHttpClientBuilder builder, Func<HttpClient, TClient> factory) 485internal static IHttpClientBuilder AddTypedClientCore<TClient>(this IHttpClientBuilder builder, Func<HttpClient, TClient> factory, bool validateSingleType) 503/// associated with the <see cref="IHttpClientBuilder"/>. 509/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 518/// Calling <see cref="HttpClientBuilderExtensions.AddTypedClient{TClient}(IHttpClientBuilder,Func{HttpClient,IServiceProvider,TClient})"/> 522public static IHttpClientBuilder AddTypedClient<TClient>(this IHttpClientBuilder builder, Func<HttpClient, IServiceProvider, TClient> factory) 531internal static IHttpClientBuilder AddTypedClientCore<TClient>(this IHttpClientBuilder builder, Func<HttpClient, IServiceProvider, TClient> factory, bool validateSingleType) 553/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 555/// <returns>The <see cref="IHttpClientBuilder"/>.</returns> 558public static IHttpClientBuilder RedactLoggedHeaders(this IHttpClientBuilder builder, Func<string, bool> shouldRedactHeaderValue) 574/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 576/// <returns>The <see cref="IHttpClientBuilder"/>.</returns> 577public static IHttpClientBuilder RedactLoggedHeaders(this IHttpClientBuilder builder, IEnumerable<string> redactedLoggedHeaderNames) 616public static IHttpClientBuilder SetHandlerLifetime(this IHttpClientBuilder builder, TimeSpan handlerLifetime) 633/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 635/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 636public static IHttpClientBuilder ConfigureAdditionalHttpMessageHandlers(this IHttpClientBuilder builder, Action<IList<DelegatingHandler>, IServiceProvider> configureAdditionalHandlers) 654/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 656/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 682/// If used in conjunction with <see cref="HttpClientFactoryServiceCollectionExtensions.ConfigureHttpClientDefaults(IServiceCollection, Action{IHttpClientBuilder})"/>, 687public static IHttpClientBuilder AddAsKeyed(this IHttpClientBuilder builder, ServiceLifetime lifetime = ServiceLifetime.Scoped) 720/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 721/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 724/// If used in conjunction with <see cref="HttpClientFactoryServiceCollectionExtensions.ConfigureHttpClientDefaults(IServiceCollection, Action{IHttpClientBuilder})"/>, 729public static IHttpClientBuilder RemoveAsKeyed(this IHttpClientBuilder builder) 755private static void ReserveClient(IHttpClientBuilder builder, Type type, string name, bool validateSingleType)
DependencyInjection\HttpClientBuilderExtensions.Logging.cs (16)
16/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 21/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 46public static IHttpClientBuilder AddLogger(this IHttpClientBuilder builder, Func<IServiceProvider, IHttpClientLogger> httpClientLoggerFactory, bool wrapHandlersPipeline = false) 76/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 79/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 108public static IHttpClientBuilder AddLogger<TLogger>(this IHttpClientBuilder builder, bool wrapHandlersPipeline = false) 119/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 120/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 121public static IHttpClientBuilder RemoveAllLoggers(this IHttpClientBuilder builder) 137/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 138/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 139public static IHttpClientBuilder AddDefaultLogger(this IHttpClientBuilder builder)
DependencyInjection\HttpClientFactoryServiceCollectionExtensions.cs (40)
78/// <param name="configure">A delegate that is used to configure an <see cref="IHttpClientBuilder"/>.</param> 80public static IServiceCollection ConfigureHttpClientDefaults(this IServiceCollection services, Action<IHttpClientBuilder> configure) 98/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 108public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, string name) 125/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 135public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, string name, Action<HttpClient> configureClient) 155/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 165public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, string name, Action<IServiceProvider, HttpClient> configureClient) 188/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 200public static IHttpClientBuilder AddHttpClient<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TClient>( 228/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 240public static IHttpClientBuilder AddHttpClient<TClient, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TImplementation>( 265/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 280public static IHttpClientBuilder AddHttpClient<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TClient>( 308/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 323public static IHttpClientBuilder AddHttpClient<TClient, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TImplementation>( 349/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 361public static IHttpClientBuilder AddHttpClient<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TClient>( 388/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 400public static IHttpClientBuilder AddHttpClient<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TClient>( 431/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 443public static IHttpClientBuilder AddHttpClient<TClient, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TImplementation>( 475/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 487public static IHttpClientBuilder AddHttpClient<TClient, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TImplementation>( 515/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 530public static IHttpClientBuilder AddHttpClient<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TClient>( 557/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 572public static IHttpClientBuilder AddHttpClient<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TClient>( 603/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 618public static IHttpClientBuilder AddHttpClient<TClient, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TImplementation>( 650/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 665public static IHttpClientBuilder AddHttpClient<TClient, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TImplementation>( 695/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 707public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Func<HttpClient, TImplementation> factory) 732/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 746public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Func<HttpClient, TImplementation> factory) 774/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 786public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Func<HttpClient, IServiceProvider, TImplementation> factory) 811/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 823public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Func<HttpClient, IServiceProvider, TImplementation> factory)
HttpClientFactoryOptions.cs (1)
100/// <see cref="HttpClientBuilderExtensions.AddHttpMessageHandler{THandler}(IHttpClientBuilder)"/>.
ITypedHttpClientFactory.cs (1)
20/// <see cref="HttpClientBuilderExtensions.AddTypedClient{TClient}(IHttpClientBuilder)"/> functionality. This type
Microsoft.Extensions.Http.Diagnostics (17)
Logging\HttpClientLoggingHttpClientBuilderExtensions.cs (14)
25/// <param name="builder">The <see cref="IHttpClientBuilder" />.</param> 28/// All other loggers are removed - including the default one, registered via <see cref="HttpClientBuilderExtensions.AddDefaultLogger(IHttpClientBuilder)"/>. 33public static IHttpClientBuilder AddExtendedHttpClientLogging(this IHttpClientBuilder builder) 43/// <param name="builder">The <see cref="IHttpClientBuilder" />.</param> 47/// All other loggers are removed - including the default one, registered via <see cref="HttpClientBuilderExtensions.AddDefaultLogger(IHttpClientBuilder)"/>. 52public static IHttpClientBuilder AddExtendedHttpClientLogging(this IHttpClientBuilder builder, IConfigurationSection section) 63/// <param name="builder">The <see cref="IHttpClientBuilder" />.</param> 67/// All other loggers are removed - including the default one, registered via <see cref="HttpClientBuilderExtensions.AddDefaultLogger(IHttpClientBuilder)"/>. 72public static IHttpClientBuilder AddExtendedHttpClientLogging(this IHttpClientBuilder builder, Action<LoggingOptions> configure) 80private static IHttpClientBuilder AddExtendedHttpClientLoggingInternal(IHttpClientBuilder builder, Action<OptionsBuilder<LoggingOptions>>? configureOptionsBuilder = null)
Logging\HttpClientLoggingServiceCollectionExtensions.cs (3)
28/// All other loggers are removed - including the default one, registered via <see cref="HttpClientBuilderExtensions.AddDefaultLogger(IHttpClientBuilder)"/>. 58/// All other loggers are removed - including the default one, registered via <see cref="HttpClientBuilderExtensions.AddDefaultLogger(IHttpClientBuilder)"/>. 80/// All other loggers are removed - including the default one, registered via <see cref="HttpClientBuilderExtensions.AddDefaultLogger(IHttpClientBuilder)"/>.
Microsoft.Extensions.Http.Diagnostics.Tests (5)
Logging\HttpClientLoggingExtensionsTest.cs (5)
37var act = () => ((IHttpClientBuilder)null!).AddExtendedHttpClientLogging(); 40act = () => ((IHttpClientBuilder)null!).AddExtendedHttpClientLogging(_ => { }); 43act = () => ((IHttpClientBuilder)null!).AddExtendedHttpClientLogging(Mock.Of<IConfigurationSection>()); 46act = () => Mock.Of<IHttpClientBuilder>().AddExtendedHttpClientLogging((Action<LoggingOptions>)null!); 49act = () => Mock.Of<IHttpClientBuilder>().AddExtendedHttpClientLogging((IConfigurationSection)null!);
Microsoft.Extensions.Http.Polly (31)
DependencyInjection\PollyHttpClientBuilderExtensions.cs (29)
23/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 25/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 31public static IHttpClientBuilder AddPolicyHandler(this IHttpClientBuilder builder, IAsyncPolicy<HttpResponseMessage> policy) 51/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 55/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 61public static IHttpClientBuilder AddPolicyHandler( 62this IHttpClientBuilder builder, 83/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 87/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 93public static IHttpClientBuilder AddPolicyHandler( 94this IHttpClientBuilder builder, 118/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 122/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 128public static IHttpClientBuilder AddPolicyHandlerFromRegistry(this IHttpClientBuilder builder, string policyKey) 155/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 159/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 165public static IHttpClientBuilder AddPolicyHandlerFromRegistry( 166this IHttpClientBuilder builder, 192/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 194/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 212/// <see cref="AddPolicyHandler(IHttpClientBuilder, IAsyncPolicy{HttpResponseMessage})"/> as desired. 215public static IHttpClientBuilder AddTransientHttpErrorPolicy( 216this IHttpClientBuilder builder, 242/// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param> 245/// <returns>An <see cref="IHttpClientBuilder"/> that can be used to configure the client.</returns> 254public static IHttpClientBuilder AddPolicyHandler(this IHttpClientBuilder builder, Func<IServiceProvider, HttpRequestMessage, string, IAsyncPolicy<HttpResponseMessage>> policyFactory, Func<HttpRequestMessage, string> keySelector)
PolicyHttpMessageHandler.cs (2)
30/// The <see cref="PollyHttpClientBuilderExtensions.AddPolicyHandler(IHttpClientBuilder, IAsyncPolicy{HttpResponseMessage})"/> 49/// The <see cref="PollyHttpClientBuilderExtensions.AddTransientHttpErrorPolicy(IHttpClientBuilder, Func{PolicyBuilder{HttpResponseMessage}, IAsyncPolicy{HttpResponseMessage}})"/>
Microsoft.Extensions.Http.Resilience (12)
Hedging\ResilienceHttpClientBuilderExtensions.Hedging.cs (3)
20/// Extensions for <see cref="IHttpClientBuilder"/>. 42public static IStandardHedgingHandlerBuilder AddStandardHedgingHandler(this IHttpClientBuilder builder, Action<IRoutingStrategyBuilder> configure) 71public static IStandardHedgingHandlerBuilder AddStandardHedgingHandler(this IHttpClientBuilder builder)
Resilience\ResilienceHttpClientBuilderExtensions.Resilience.cs (6)
18/// Extensions for <see cref="IHttpClientBuilder"/>. 30/// The final pipeline name is combination of <see cref="IHttpClientBuilder.Name"/> and <paramref name="pipelineName"/>. 34this IHttpClientBuilder builder, 53/// The final pipeline name is combination of <see cref="IHttpClientBuilder.Name"/> and <paramref name="pipelineName"/>. 57this IHttpClientBuilder builder, 111this IHttpClientBuilder builder,
Resilience\ResilienceHttpClientBuilderExtensions.StandardResilience.cs (3)
31public static IHttpStandardResiliencePipelineBuilder AddStandardResilienceHandler(this IHttpClientBuilder builder, IConfigurationSection section) 49public static IHttpStandardResiliencePipelineBuilder AddStandardResilienceHandler(this IHttpClientBuilder builder, Action<HttpStandardResilienceOptions> configure) 66public static IHttpStandardResiliencePipelineBuilder AddStandardResilienceHandler(this IHttpClientBuilder builder)
Microsoft.Extensions.Http.Resilience.PerformanceTests (1)
HttpClientFactory.cs (1)
67var clientBuilder = services.AddHttpClient(clientType.ToString(), client => client.Timeout = Timeout.InfiniteTimeSpan);
Microsoft.Extensions.Http.Resilience.Tests (21)
Hedging\HedgingTests.cs (2)
41private protected HedgingTests(Func<IHttpClientBuilder, Func<RequestRoutingStrategy>, TBuilder> createDefaultBuilder) 50var httpClient = _services.AddHttpClient(ClientId);
Hedging\StandardHedgingTests.cs (1)
33private static IStandardHedgingHandlerBuilder ConfigureDefaultBuilder(IHttpClientBuilder builder, Func<RequestRoutingStrategy> factory)
Resilience\GrpcResilienceTests.cs (2)
96private Greeter.GreeterClient CreateClient(Action<IHttpClientBuilder>? configure = null) 99var clientBuilder = services
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (7)
29IHttpClientBuilder? builder = services.AddHttpClient("client"); 47IHttpClientBuilder? builder = services.AddHttpClient("client"); 67IHttpClientBuilder? builder = services 90IHttpClientBuilder? builder = services.AddHttpClient("client"); 170IHttpClientBuilder? builder = services.AddHttpClient("client"); 205var builder = services.AddHttpClient("client"); 254var clientBuilder = services.AddHttpClient("client");
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (9)
26private readonly IHttpClientBuilder _builder; 105IHttpClientBuilder builder = null!; 115var builder = new ServiceCollection().AddHttpClient("test"); 126var builder = new ServiceCollection().AddHttpClient("test"); 136var builder = new ServiceCollection().AddHttpClient("test"); 146var builder = new ServiceCollection().AddLogging().AddMetrics().AddHttpClient("test"); 182var builder = new ServiceCollection().AddLogging().AddMetrics().AddHttpClient("test"); 211var builder = new ServiceCollection().AddLogging().AddMetrics().AddHttpClient("test"); 273IHttpClientBuilder builder,
Microsoft.Extensions.ServiceDiscovery (4)
ServiceDiscoveryHttpClientBuilderExtensions.cs (4)
13/// Extensions for configuring <see cref="IHttpClientBuilder"/> with service discovery. 18/// Adds service discovery to the <see cref="IHttpClientBuilder"/>. 22public static IHttpClientBuilder AddServiceDiscovery(this IHttpClientBuilder httpClientBuilder)