137 references to new
Aspire.Dashboard.Tests (12)
Integration\FrontendBrowserTokenAuthTests.cs (5)
40using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 62using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 93using var client = new HttpClient { BaseAddress = new Uri($"http://{app.OtlpServiceHttpEndPointAccessor().EndPoint}") }; 117using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 142using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") };
Integration\OtlpHttpServiceTests.cs (5)
228using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 256using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 281using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 310using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 339using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") };
Integration\StartupTests.cs (2)
395using var httpClient = new HttpClient() 690using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") };
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
188using var client = new HttpClient();
Aspire.Hosting.Tests (3)
DistributedApplicationTests.cs (3)
210using var clientB = new HttpClient(); 752using var client = new HttpClient(); 772using var client = new HttpClient();
Aspire.Playground.Tests (1)
Infrastructure\DistributedApplicationExtensions.cs (1)
183var httpClient = new HttpClient
Aspire.Workload.Tests (1)
StarterTemplateRunTestsBase.cs (1)
74using var httpClient = new HttpClient();
BasicTestApp (1)
Program.cs (1)
34builder.Services.AddSingleton(new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
BasicWebSite (1)
StartupWithoutEndpointRouting.cs (1)
66var client = new HttpClient();
dotnet-openapi (1)
Program.cs (1)
22using var httpClient = new HttpClientWrapper(new HttpClient());
GenerateRulesMissingDocumentation (1)
Program.cs (1)
34var httpClient = new HttpClient();
HostedBlazorWebassemblyApp.Client (1)
Program.cs (1)
24builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
IIS.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
45var connection = new HttpClient()
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (2)
43using var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(200) }; 57using var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(200) };
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
45var connection = new HttpClient()
IIS.Microbenchmarks (1)
PlaintextBenchmark.cs (1)
28_client = new HttpClient()
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
45var connection = new HttpClient()
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
45var connection = new HttpClient()
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
45var connection = new HttpClient()
IISExpress.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
45var connection = new HttpClient()
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (2)
43using var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(200) }; 57using var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(200) };
Infrastructure.Common (3)
ServiceUtilHelper.cs (3)
542using (HttpClient httpClient = new HttpClient()) 554using (HttpClient httpClient = new HttpClient()) 566using (HttpClient httpClient = new HttpClient())
installer.tasks (1)
StaticFileRegeneration\RegenerateThirdPartyNotices.cs (1)
41using (var client = new HttpClient())
JwtClientSample (1)
Program.cs (1)
84var httpResponse = await new HttpClient().GetAsync(ServerUrl + $"/generatetoken?user={userId}");
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
423using var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) };
Microsoft.AspNetCore.Http.Connections.Tests (2)
HttpConnectionDispatcherTests.cs (2)
3255using (var client = new HttpClient()) 3417using (var client = new HttpClient())
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (35)
DelegateTests.cs (2)
270using var client = new HttpClient(); 276using var client = new HttpClient();
Listener\RequestBodyTests.cs (2)
177var client = new HttpClient(); 202using (HttpClient client = new HttpClient())
Listener\ResponseBodyTests.cs (5)
366using (var client = new HttpClient()) 406using (var client = new HttpClient()) 445using (var client = new HttpClient()) 479using (var client = new HttpClient()) 508using (HttpClient client = new HttpClient() { Timeout = Utilities.DefaultTimeout })
Listener\ResponseHeaderTests.cs (1)
20private HttpClient _client = new HttpClient();
Listener\ServerOnExistingQueueTests.cs (2)
320using HttpClient client = new HttpClient(); 326using HttpClient client = new HttpClient();
Listener\ServerTests.cs (3)
30using (var client = new HttpClient()) 59using (var client = new HttpClient()) 208using (HttpClient client = new HttpClient())
OpaqueUpgradeTests.cs (2)
295using var client = new HttpClient(); 371using (HttpClient client = new HttpClient())
RequestBodyLimitTests.cs (1)
412using (HttpClient client = new HttpClient())
RequestBodyTests.cs (1)
301using (HttpClient client = new HttpClient())
RequestHeaderTests.cs (2)
235HttpClient client = new HttpClient(); 246using (HttpClient client = new HttpClient())
RequestTests.cs (1)
619using (HttpClient client = new HttpClient())
ResponseBodyTests.cs (1)
439using (HttpClient client = new HttpClient())
ResponseCachingTests.cs (2)
471using (var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(10) }) 486using (var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(10) })
ResponseHeaderTests.cs (3)
170using (HttpClient client = new HttpClient()) 197using (HttpClient client = new HttpClient()) 329using (HttpClient client = new HttpClient())
ResponseSendFileTests.cs (3)
612using (var client = new HttpClient()) 661using (var client = new HttpClient()) 681using (HttpClient client = new HttpClient() { Timeout = Utilities.DefaultTimeout })
ResponseTests.cs (1)
281using (var client = new HttpClient())
ServerTests.cs (3)
369using (HttpClient client4 = new HttpClient()) 639using (HttpClient client = new HttpClient() { Timeout = Utilities.DefaultTimeout }) 647using (HttpClient client = new HttpClient() { Timeout = Utilities.DefaultTimeout })
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (1)
DelegateOutOfProcTests.cs (1)
64using var client = new HttpClient();
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Deployers\NginxDeployer.cs (1)
78using (var httpClient = new HttpClient())
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (2)
1478var httpResponse = await new HttpClient().GetAsync(server.Url + "/generateJwtToken"); 2695var httpResponse = await new HttpClient().GetAsync(server.Url + $"/generateJwtToken/{userName}");
Microsoft.AspNetCore.SignalR.Tests (8)
DefaultTransportFactoryTests.cs (6)
24Assert.NotNull(new DefaultTransportFactory(transportType, new LoggerFactory(), new HttpClient(), httpConnectionOptions: null, accessTokenProvider: null)); 54var transportFactory = new DefaultTransportFactory(requestedTransport, loggerFactory: null, httpClient: new HttpClient(), httpConnectionOptions: null, accessTokenProvider: null); 67new DefaultTransportFactory(requestedTransport, loggerFactory: null, httpClient: new HttpClient(), httpConnectionOptions: null, accessTokenProvider: null); 79new DefaultTransportFactory(AllTransportTypes, loggerFactory: null, httpClient: new HttpClient(), httpConnectionOptions: null, accessTokenProvider: null) 91var transportFactory = new DefaultTransportFactory(requestedTransport, loggerFactory: null, httpClient: new HttpClient(), httpConnectionOptions: null, accessTokenProvider: null); 104new DefaultTransportFactory(requestedTransport, loggerFactory: null, httpClient: new HttpClient(), httpConnectionOptions: null, accessTokenProvider: null);
EndToEndTests.cs (2)
477using (var client = new HttpClient()) 651using (var client = new HttpClient())
Microsoft.AspNetCore.SpaServices.Extensions (1)
AngularCli\AngularCliMiddleware.cs (1)
105using (var client = new HttpClient())
Microsoft.AspNetCore.StaticFiles.FunctionalTests (7)
FallbackStaticFileTest.cs (2)
57using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 106using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) })
StaticFileMiddlewareTests.cs (5)
36using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 81using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 106using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 156using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 198using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) })
Microsoft.AspNetCore.Testing (1)
ServiceFakesHostExtensions.cs (1)
52return new HttpClient { BaseAddress = uri };
Microsoft.AspNetCore.WebSockets.Tests (7)
WebSocketCompressionMiddlewareTests.cs (3)
28using (var client = new HttpClient()) 56using (var client = new HttpClient()) 90using (var client = new HttpClient())
WebSocketMiddlewareTests.cs (4)
669using (var client = new HttpClient()) 703using (var client = new HttpClient()) 752using (var client = new HttpClient()) 825using (var client = new HttpClient())
Microsoft.DotNet.Internal.SymbolHelper (2)
SymbolPromotionHelper.cs (1)
33private static readonly HttpClient s_client = new();
SymbolUploadHelperFactory.cs (1)
24private static readonly HttpClient s_symbolDownloadClient = new();
Microsoft.DotNet.Open.Api.Tools.Tests (1)
OpenApiTestBase.cs (1)
80wrapper = new HttpClientWrapper(new HttpClient());
Microsoft.Extensions.Logging.AzureAppServices (1)
BlobLoggerProvider.cs (1)
52_httpClient = new HttpClient();
Microsoft.Extensions.ML (2)
ModelLoaders\UriModelLoader.cs (2)
107using (var client = new HttpClient()) 141using (var client = new HttpClient())
Microsoft.ML.AutoML.Tests (1)
DatasetUtil.cs (1)
208using (var client = new HttpClient())
Microsoft.ML.Core (1)
Utilities\ResourceManagerUtils.cs (1)
157using (var client = new HttpClient())
Microsoft.ML.PerformanceTests (1)
ImageClassificationBench.cs (1)
159using (HttpClient client = new HttpClient())
Microsoft.ML.Samples (5)
Dynamic\TensorFlow\ImageClassification.cs (1)
123using (HttpClient client = new HttpClient())
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
272using (HttpClient client = new HttpClient())
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
304using (HttpClient client = new HttpClient())
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
260using (HttpClient client = new HttpClient())
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
281using (HttpClient client = new HttpClient())
Microsoft.ML.Samples.GPU (5)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\ImageClassification.cs (1)
123using (HttpClient client = new HttpClient())
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
272using (HttpClient client = new HttpClient())
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
304using (HttpClient client = new HttpClient())
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
260using (HttpClient client = new HttpClient())
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
281using (HttpClient client = new HttpClient())
Microsoft.ML.SamplesUtils (1)
SamplesDatasetUtils.cs (1)
196using (HttpClient client = new HttpClient())
Microsoft.ML.Tokenizers.Data.Tests (1)
test\Microsoft.ML.Tokenizers.Tests\Utils.cs (1)
17using (var client = new HttpClient() { Timeout = TimeSpan.FromMinutes(5) })
Microsoft.ML.Tokenizers.Tests (2)
LlamaTests.cs (1)
21private static readonly HttpClient _httpClient = new HttpClient() { Timeout = TimeSpan.FromMinutes(5) };
Utils.cs (1)
17using (var client = new HttpClient() { Timeout = TimeSpan.FromMinutes(5) })
Sockets.FunctionalTests (5)
SocketTransportTests.cs (1)
51using var client = new HttpClient();
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (2)
180using (var client = new HttpClient()) 1119using (var client = new HttpClient())
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (2)
76using (var client = new HttpClient()) 125using (var client = new HttpClient())
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
148var httpClient = new HttpClient
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
148var httpClient = new HttpClient
Templates.Mvc.Tests (1)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
148var httpClient = new HttpClient
Templates.Tests (1)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
148var httpClient = new HttpClient