85 references to AddHttpClient
Aspire.Hosting (2)
ResourceBuilderExtensions.cs (2)
3550
/// instance with a specific handler, timeout, or other options using <see cref="HttpClientFactoryServiceCollectionExtensions.
AddHttpClient
(IServiceCollection, string)"/>.
3644
/// instance with a specific handler, timeout, or other options using <see cref="HttpClientFactoryServiceCollectionExtensions.
AddHttpClient
(IServiceCollection, string)"/>.
Aspire.Hosting.Azure (1)
Provisioning\AzureProvisionerExtensions.cs (1)
49
builder.Services.
AddHttpClient
("AcrLogin");
Aspire.Hosting.Foundry.Tests (1)
HostedAgentExtensionTests.cs (1)
162
builder.Services.
AddHttpClient
(string.Empty)
Aspire.Hosting.Tests (14)
WithHttpCommandTests.cs (14)
126
builder.Services.
AddHttpClient
(Options.DefaultName)
330
builder.Services.
AddHttpClient
(string.Empty)
445
builder.Services.
AddHttpClient
("commandclient")
471
builder.Services.
AddHttpClient
("commandclient")
502
builder.Services.
AddHttpClient
("commandclient")
607
builder.Services.
AddHttpClient
("commandclient")
651
builder.Services.
AddHttpClient
("commandclient")
695
builder.Services.
AddHttpClient
("commandclient")
738
builder.Services.
AddHttpClient
("commandclient")
805
builder.Services.
AddHttpClient
("commandclient")
831
builder.Services.
AddHttpClient
("commandclient")
858
builder.Services.
AddHttpClient
("commandclient")
886
builder.Services.
AddHttpClient
("commandclient")
913
builder.Services.
AddHttpClient
("commandclient")
Aspire.Keycloak.Authentication (2)
AspireKeycloakExtensions.cs (2)
86
builder.Services.
AddHttpClient
(KeycloakBackchannel);
168
builder.Services.
AddHttpClient
(KeycloakBackchannel);
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (8)
HttpClientFactory.cs (8)
24
.
AddHttpClient
(nameof(fileName))
47
.
AddHttpClient
(nameof(fileName))
70
.
AddHttpClient
(nameof(fileName))
97
.
AddHttpClient
(nameof(fileName))
120
.
AddHttpClient
(nameof(fileName))
143
.
AddHttpClient
(nameof(fileName))
164
.
AddHttpClient
(nameof(fileName))
174
.
AddHttpClient
(nameof(fileName))
Microsoft.Extensions.Http.Diagnostics.Tests (29)
Logging\AcceptanceTests.cs (12)
102
.
AddHttpClient
("testClient").Services
136
.
AddHttpClient
("namedClient1")
146
.
AddHttpClient
("namedClient2")
409
.
AddHttpClient
("test")
449
.
AddHttpClient
(FirstClientName)
456
.
AddHttpClient
(SecondClientName)
532
.
AddHttpClient
("testClient3")
538
.
AddHttpClient
("testClient4")
584
.
AddHttpClient
("test")
606
.
AddHttpClient
("test")
609
.
AddHttpClient
("normal")
662
.
AddHttpClient
(nameof(HttpClientLoggingHandler_LogsBodyDataUpToSpecifiedLimit))
Logging\HttpClientLoggingExtensionsTest.cs (17)
90
.
AddHttpClient
("test1")
93
.
AddHttpClient
("test2")
136
.
AddHttpClient
("")
139
.
AddHttpClient
("")
167
.
AddHttpClient
("test")
211
.
AddHttpClient
("test")
235
.
AddHttpClient
("test")
272
.
AddHttpClient
("test")
365
services.
AddHttpClient
("test")
396
.
AddHttpClient
("test")
418
.
AddHttpClient
("test")
441
.
AddHttpClient
("test")
555
.
AddHttpClient
(ClientName)
579
.
AddHttpClient
(ClientName)
657
.
AddHttpClient
("test")
704
.
AddHttpClient
("outer")
710
.
AddHttpClient
("inner")
Microsoft.Extensions.Http.Resilience.PerformanceTests (5)
HttpClientFactory.cs (1)
44
.
AddHttpClient
(StandardClient)
RetryBenchmark.cs (2)
39
.
AddHttpClient
("v8")
58
.
AddHttpClient
("v7")
StandardResilienceBenchmark.cs (2)
39
.
AddHttpClient
("v8")
60
.
AddHttpClient
("v7")
Microsoft.Extensions.Http.Resilience.Tests (23)
Hedging\HedgingTests.cs (1)
50
var httpClient = _services.
AddHttpClient
(ClientId);
Hedging\StandardHedgingTests.cs (1)
310
.
AddHttpClient
(ClientId)
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (12)
30
IHttpClientBuilder? builder = services.
AddHttpClient
("client");
48
IHttpClientBuilder? builder = services.
AddHttpClient
("client");
69
.
AddHttpClient
("client")
91
IHttpClientBuilder? builder = services.
AddHttpClient
("client");
121
.
AddHttpClient
("client")
171
IHttpClientBuilder? builder = services.
AddHttpClient
("client");
206
var builder = services.
AddHttpClient
("client");
255
var clientBuilder = services.
AddHttpClient
("client");
280
.
AddHttpClient
("my-client")
303
IHttpClientBuilder? builder = services.
AddHttpClient
("custom");
328
IHttpClientBuilder? builder = services.
AddHttpClient
("custom");
344
IHttpClientBuilder? builder = services.
AddHttpClient
("custom");
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (9)
31
_builder = new ServiceCollection().
AddHttpClient
(BuilderName);
115
var builder = new ServiceCollection().
AddHttpClient
("test");
126
var builder = new ServiceCollection().
AddHttpClient
("test");
136
var builder = new ServiceCollection().
AddHttpClient
("test");
146
var builder = new ServiceCollection().AddLogging().AddMetrics().
AddHttpClient
("test");
159
.
AddHttpClient
("test")
182
var builder = new ServiceCollection().AddLogging().AddMetrics().
AddHttpClient
("test");
211
var builder = new ServiceCollection().AddLogging().AddMetrics().
AddHttpClient
("test");
264
var builder = new ServiceCollection().AddLogging().AddMetrics().
AddHttpClient
("test").AddStandardResilienceHandler();