318 instantiations of HttpClient
Aspire.Dashboard.Tests (18)
Aspire.Hosting.Redis (1)
Aspire.Hosting.Tests (4)
Aspire.Playground.Tests (1)
Aspire.Seq (1)
Aspire.Workload.Tests (1)
BasicTestApp (1)
BasicWebSite (1)
dotnet-openapi (1)
dotnet-svcutil-lib (1)
GenerateRulesMissingDocumentation (1)
HostedBlazorWebassemblyApp.Client (1)
HttpClientApp (1)
HttpStress (1)
IIS.FunctionalTests (12)
IIS.LongTests (2)
IIS.Microbenchmarks (1)
IIS.NewHandler.FunctionalTests (2)
IIS.NewShim.FunctionalTests (2)
IIS.ShadowCopy.Tests (1)
IIS.Tests (1)
IISExpress.FunctionalTests (10)
Infrastructure.Common (3)
InMemory.FunctionalTests (7)
installer.tasks (1)
Interop.FunctionalTests (9)
JwtClientSample (1)
Microsoft.Arcade.Test.Common (1)
Microsoft.AspNetCore.Authentication.JwtBearer (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
Microsoft.AspNetCore.Authentication.Twitter (1)
Microsoft.AspNetCore.Authentication.WsFederation (1)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
Microsoft.AspNetCore.HeaderPropagation.Tests (1)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.AspNetCore.Http.Connections.Tests (3)
Microsoft.AspNetCore.Identity.Test (1)
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
Microsoft.AspNetCore.Mvc.Testing (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (52)
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (1)
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
Microsoft.AspNetCore.SignalR.Client.Tests (34)
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);
Microsoft.AspNetCore.SpaProxy (1)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (7)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.TestHost.Tests (22)
Microsoft.AspNetCore.Testing (3)
Microsoft.AspNetCore.WebSockets.Tests (7)
Microsoft.Build.Tasks.Core (1)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.Build.Tasks.Feed (2)
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Git.IssueManager (1)
Microsoft.DotNet.Helix.Sdk (3)
Microsoft.DotNet.Internal.SymbolHelper (2)
Microsoft.DotNet.Open.Api.Tools.Tests (1)
Microsoft.DotNet.SignTool (1)
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
Microsoft.DotNet.VersionTools (1)
Microsoft.Extensions.Http (1)
Microsoft.Extensions.Http.Diagnostics.Tests (14)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.ML (2)
Microsoft.Maui.Controls (1)
Microsoft.ML.AutoML.Tests (1)
Microsoft.ML.Core (1)
Microsoft.ML.PerformanceTests (1)
Microsoft.ML.Samples (5)
Microsoft.ML.Samples.GPU (5)
Microsoft.ML.SamplesUtils (1)
Microsoft.ML.Tokenizers.Data.Tests (1)
Microsoft.ML.Tokenizers.Tests (2)
Negotiate.Client (2)
Sockets.FunctionalTests (7)
System.Net.Requests (1)
System.Private.Xml (1)
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (2)
1755 references to HttpClient
Aspire.Dashboard.Tests (28)
Aspire.EndToEnd.Tests (3)
Aspire.Hosting.Containers.Tests (6)
Aspire.Hosting.NodeJs.Tests (3)
Aspire.Hosting.PostgreSQL.Tests (2)
Aspire.Hosting.Redis (2)
Aspire.Hosting.Redis.Tests (8)
Aspire.Hosting.Testing (7)
Aspire.Hosting.Testing.Tests (6)
Aspire.Hosting.Tests (16)
Aspire.Playground.Tests (14)
Aspire.Seq (1)
Aspire.Workload.Tests (4)
AuthSamples.FunctionalTests (11)
AzureFunctionsEndToEnd.ApiService (1)
BasicTestApp (2)
BasicWebSite (3)
Diagnostics.EFCore.FunctionalTests (1)
Diagnostics.FunctionalTests (8)
dotnet-openapi (2)
dotnet-svcutil-lib (12)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (10)
39private HttpClient _httpClient;
41private volatile MruCache<string, HttpClient> _httpClientCache;
229internal async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, SecurityTokenProviderContainer tokenProvider,
241internal HttpClient GetHttpClient(EndpointAddress to, NetworkCredential credential,
251_httpClientCache = new MruCache<string, HttpClient>(10);
256HttpClient httpClient;
519var httpClientToDispose = _httpClient;
816internal virtual Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, TimeoutHelper timeoutHelper)
821protected async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, SecurityTokenContainer clientCertificateToken, TimeoutHelper timeoutHelper)
883private HttpClient _httpClient;
GenerateRulesMissingDocumentation (1)
HeaderPropagationSample (1)
HostedBlazorWebassemblyApp.Client (2)
HttpClientApp (1)
HttpStress (3)
IIS.FunctionalTests (30)
IIS.LongTests (10)
IIS.Microbenchmarks (2)
IIS.NewHandler.FunctionalTests (10)
IIS.NewShim.FunctionalTests (10)
IIS.ShadowCopy.Tests (5)
IIS.Tests (1)
IISExpress.FunctionalTests (22)
Infrastructure.Common (3)
InMemory.FunctionalTests (7)
installer.tasks (2)
Interop.FunctionalTests (45)
Keycloak.Web (1)
Microsoft.Arcade.Test.Common (1)
Microsoft.AspNetCore.Authentication (1)
Microsoft.AspNetCore.Authentication.JwtBearer (1)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Authentication.OAuth (4)
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
Microsoft.AspNetCore.Authentication.Test (45)
Microsoft.AspNetCore.Authentication.Twitter (1)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (31)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (4)
Microsoft.AspNetCore.Diagnostics.Tests (26)
Microsoft.AspNetCore.HeaderPropagation (7)
Microsoft.AspNetCore.HeaderPropagation.Tests (8)
Microsoft.AspNetCore.Http.Connections.Client (13)
Microsoft.AspNetCore.Http.Connections.Tests (3)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
Microsoft.AspNetCore.HttpLogging.Tests (11)
Microsoft.AspNetCore.HttpsPolicy.Tests (18)
Microsoft.AspNetCore.Identity.FunctionalTests (162)
UserStories.cs (16)
16internal static async Task<Index> RegisterNewUserAsync(HttpClient client, string userName = null, string password = null)
27internal static async Task<RegisterConfirmation> RegisterNewUserAsyncWithConfirmation(HttpClient client, string userName = null, string password = null, bool hasRealEmailSender = false)
38internal static async Task<Index> LoginExistingUserAsync(HttpClient client, string userName, string password)
47internal static async Task LoginFailsWithWrongPasswordAsync(HttpClient client, string userName, string password)
56internal static async Task<DefaultUIPage> LockoutExistingUserAsync(HttpClient client, string userName, string password)
66internal static async Task<Index> RegisterNewUserWithSocialLoginAsync(HttpClient client, string userName, string email)
79internal static async Task<RegisterConfirmation> RegisterNewUserWithSocialLoginWithConfirmationAsync(HttpClient client, string userName, string email, bool hasRealEmailSender = false)
92internal static async Task<Index> RegisterNewUserWithSocialLoginAsyncViaRegisterPage(HttpClient client, string userName, string email)
119internal static async Task<Index> LoginWithSocialLoginAsync(HttpClient client, string userName)
134internal static async Task<Index> LoginExistingUser2FaAsync(HttpClient client, string userName, string password, string twoFactorKey)
166HttpClient client,
182internal static async Task<ConfirmEmail> ConfirmEmailAsync(IdentityEmail email, HttpClient client)
193internal static async Task ResendConfirmEmailAsync(HttpClient client, string email)
203internal static async Task<ForgotPasswordConfirmation> ForgotPasswordAsync(HttpClient client, string userName)
214internal static async Task<ResetPasswordConfirmation> ResetPasswordAsync(HttpClient client, IdentityEmail resetPasswordEmail, string email, string newPassword)
274internal static async Task AcceptCookiePolicy(HttpClient client)
Microsoft.AspNetCore.Identity.Test (1)
Microsoft.AspNetCore.Localization.FunctionalTests (2)
Microsoft.AspNetCore.Localization.Routing.Tests (3)
Microsoft.AspNetCore.Localization.Tests (19)
Microsoft.AspNetCore.Mvc.FunctionalTests (143)
Microsoft.AspNetCore.Mvc.Testing (32)
Microsoft.AspNetCore.OutputCaching.Tests (41)
Microsoft.AspNetCore.RequestDecompression.Tests (6)
Microsoft.AspNetCore.ResponseCaching.Tests (37)
Microsoft.AspNetCore.ResponseCompression.Tests (17)
Microsoft.AspNetCore.Routing.FunctionalTests (32)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (53)
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (1)
Microsoft.AspNetCore.Server.IntegrationTesting (6)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (5)
Microsoft.AspNetCore.Session.Tests (21)
Microsoft.AspNetCore.SignalR.Client.Tests (30)
Microsoft.AspNetCore.SignalR.Tests (2)
Microsoft.AspNetCore.SpaProxy (5)
Microsoft.AspNetCore.SpaServices.Extensions (5)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
Microsoft.AspNetCore.StaticAssets.Tests (31)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (7)
Microsoft.AspNetCore.TestHost (4)
Microsoft.AspNetCore.TestHost.Tests (60)
Microsoft.AspNetCore.Testing (3)
Microsoft.AspNetCore.Testing.Tests (7)
Microsoft.AspNetCore.Tests (21)
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Microsoft.AspNetCore.WebSockets.Tests (7)
Microsoft.Build.Tasks.Core (1)
Microsoft.DotNet.Arcade.Sdk (2)
Microsoft.DotNet.Build.Tasks.Feed (9)
src\PublishArtifactsInManifestBase.cs (3)
1796Func<TargetFeedConfig, HttpClient, T, string, string, string, Task> packagePublishAction)
1801HttpClient client,
1808Func<string, string, HttpClient, MsBuildUtils.TaskLoggingHelper, Task<PackageFeedStatus>> CompareLocalPackageToFeedPackageCallBack = null,
Microsoft.DotNet.Build.Tasks.Feed.Tests (12)
Microsoft.DotNet.Deployment.Tasks.Links (5)
Microsoft.DotNet.Git.IssueManager (3)
Microsoft.DotNet.Helix.Sdk (15)
Microsoft.DotNet.Internal.SymbolHelper (2)
Microsoft.DotNet.SignTool (1)
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
Microsoft.DotNet.VersionTools (9)
Microsoft.Extensions.Http (174)
DependencyInjection\HttpClientBuilderExtensions.cs (43)
23/// Adds a delegate that will be used to configure a named <see cref="HttpClient"/>.
26/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
28public static IHttpClientBuilder ConfigureHttpClient(this IHttpClientBuilder builder, Action<HttpClient> configureClient)
39/// Adds a delegate that will be used to configure a named <see cref="HttpClient"/>.
42/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
48public static IHttpClientBuilder ConfigureHttpClient(this IHttpClientBuilder builder, Action<IServiceProvider, HttpClient> configureClient)
65/// Adds a delegate that will be used to create an additional message handler for a named <see cref="HttpClient"/>.
88/// Adds a delegate that will be used to create an additional message handler for a named <see cref="HttpClient"/>.
117/// Adds an additional message handler from the dependency injection container for a named <see cref="HttpClient"/>.
145/// named <see cref="HttpClient"/>.
169/// named <see cref="HttpClient"/>.
199/// for a named <see cref="HttpClient"/>.
227/// named <see cref="HttpClient"/>.
253/// for a named <see cref="HttpClient"/>.
271/// Adds or updates <see cref="SocketsHttpHandler"/> as a primary handler for a named <see cref="HttpClient"/>. If provided,
307/// Adds or updates <see cref="SocketsHttpHandler"/> as a primary handler for a named <see cref="HttpClient"/>
336/// Configures a binding between the <typeparamref name="TClient" /> type and the named <see cref="HttpClient"/>
346/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
385HttpClient httpClient = httpClientFactory.CreateClient(builder.Name);
392/// Configures a binding between the <typeparamref name="TClient" /> type and the named <see cref="HttpClient"/>
407/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
449HttpClient httpClient = httpClientFactory.CreateClient(builder.Name);
456/// Configures a binding between the <typeparamref name="TClient" /> type and the named <see cref="HttpClient"/>
467/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
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)
493HttpClient httpClient = httpClientFactory.CreateClient(builder.Name);
502/// Configures a binding between the <typeparamref name="TClient" /> type and the named <see cref="HttpClient"/>
513/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
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)
542HttpClient httpClient = httpClientFactory.CreateClient(builder.Name);
612/// <see cref="HttpClient"/> instances will prevent the underlying <see cref="HttpMessageHandler"/> from being
631/// for a named <see cref="HttpClient"/>.
650/// Registers a named <see cref="HttpClient"/> and the related handler pipeline <see cref="HttpMessageHandler"/> as keyed
664/// WARNING: Registering the client as a keyed <see cref="ServiceLifetime.Transient"/> service will lead to the <see cref="HttpClient"/> and <see cref="HttpMessageHandler"/>
669/// WARNING: In case of (1) a keyed <see cref="ServiceLifetime.Singleton"/> <see cref="HttpClient"/> registration, or (2) a keyed <see cref="ServiceLifetime.Transient"/>
670/// <see cref="HttpClient"/> injected into a <see cref="ServiceLifetime.Singleton"/> service, or (3) long-running application scopes,
671/// the <see cref="HttpClient"/> instances will get captured by a singleton or a long-running scope, so they will NOT be able to participate in the handler rotation,
683/// the key <see cref="KeyedService.AnyKey"/> is used, so any named <see cref="HttpClient"/> instance will be resolvable as a keyed service (unless explicitly opted-out
718/// Removes the keyed registrations for the named <see cref="HttpClient"/> and <see cref="HttpMessageHandler"/>.
DependencyInjection\HttpClientFactoryServiceCollectionExtensions.cs (90)
75/// Adds a delegate that will be used to configure all <see cref="HttpClient"/> instances.
94/// a named <see cref="HttpClient"/>.
97/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
101/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
120/// a named <see cref="HttpClient"/>.
123/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
124/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
128/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
135public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, string name, Action<HttpClient> configureClient)
150/// a named <see cref="HttpClient"/>.
153/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
154/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
158/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
165public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, string name, Action<IServiceProvider, HttpClient> configureClient)
180/// a binding between the <typeparamref name="TClient"/> type and a named <see cref="HttpClient"/>. The client name
191/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
195/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
216/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>. The client name will
231/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
235/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
257/// a binding between the <typeparamref name="TClient"/> type and a named <see cref="HttpClient"/>.
264/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
268/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
272/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
296/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>.
307/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
311/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
315/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
340/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>. The client name will
348/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
352/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
356/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
362this IServiceCollection services, Action<HttpClient> configureClient)
379/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>. The client name will
387/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
391/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
395/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
401this IServiceCollection services, Action<IServiceProvider, HttpClient> configureClient)
418/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>. The client name will
430/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
434/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
438/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
444this IServiceCollection services, Action<HttpClient> configureClient)
462/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>. The client name will
474/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
478/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
482/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
488this IServiceCollection services, Action<IServiceProvider, HttpClient> configureClient)
506/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>.
513/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
514/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
518/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
522/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
531this IServiceCollection services, string name, Action<HttpClient> configureClient)
548/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>.
555/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
556/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
560/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
564/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
573this IServiceCollection services, string name, Action<IServiceProvider, HttpClient> configureClient)
590/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>.
601/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
602/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
606/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
610/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
619this IServiceCollection services, string name, Action<HttpClient> configureClient)
637/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>.
648/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
649/// <param name="configureClient">A delegate that is used to configure an <see cref="HttpClient"/>.</param>
653/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
657/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
666this IServiceCollection services, string name, Action<IServiceProvider, HttpClient> configureClient)
684/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>.
698/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
702/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
707public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Func<HttpClient, TImplementation> factory)
720/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>.
730/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
735/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
739/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
746public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Func<HttpClient, TImplementation> factory)
763/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>.
777/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
781/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
786public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Func<HttpClient, IServiceProvider, TImplementation> factory)
799/// a binding between the <typeparamref name="TClient" /> type and a named <see cref="HttpClient"/>.
809/// <param name="name">The logical name of the <see cref="HttpClient"/> to configure.</param>
814/// <see cref="HttpClient"/> instances that apply the provided configuration can be retrieved using
818/// <typeparamref name="TClient"/> instances constructed with the appropriate <see cref="HttpClient" />
823public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Func<HttpClient, IServiceProvider, TImplementation> factory)
Microsoft.Extensions.Http.Diagnostics (5)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (32)
Microsoft.Extensions.Http.Diagnostics.Tests (38)
Microsoft.Extensions.Http.Polly (3)
Microsoft.Extensions.Http.Polly.Tests (9)
Microsoft.Extensions.Http.Resilience.PerformanceTests (10)
Microsoft.Extensions.Http.Resilience.Tests (26)
Microsoft.Extensions.Logging.AzureAppServices (3)
Microsoft.Extensions.ML (2)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
Microsoft.Maui.Controls (2)
Microsoft.ML.AutoML.Tests (1)
Microsoft.ML.Core (2)
Microsoft.ML.PerformanceTests (1)
Microsoft.ML.Samples (5)
Microsoft.ML.Samples.GPU (5)
Microsoft.ML.SamplesUtils (1)
Microsoft.ML.Tokenizers (2)
Microsoft.ML.Tokenizers.Data.Tests (1)
Microsoft.ML.Tokenizers.Tests (2)
MyFrontend (1)
Negotiate.Client (10)
netstandard (1)
PhotinoTestApp (1)
ServerComparison.FunctionalTests (14)
ResponseTests.cs (7)
79private async Task ResponseFormats(TestVariant variant, Func<HttpClient, ILogger, Task> scenario, [CallerMemberName] string testName = null)
126private static async Task CheckContentLengthAsync(HttpClient client, ILogger logger)
151private static async Task CheckHttp11ConnectionCloseAsync(HttpClient client, ILogger logger)
171private static async Task CheckHttp10ConnectionCloseAsync(HttpClient client, ILogger logger)
196private static async Task CheckChunkedAsync(HttpClient client, ILogger logger)
221private static async Task CheckManuallyChunkedAsync(HttpClient client, ILogger logger)
246private static async Task CheckManuallyChunkedAndCloseAsync(HttpClient client, ILogger logger)
Sockets.FunctionalTests (7)
Stress.ApiService (1)
Stress.AppHost (1)
System.Net.Http (4)
System.Net.Http.Json (66)
System\Net\Http\Json\HttpClientJsonExtensions.cs (13)
19private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
24private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
27private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) =>
30private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken) =>
34Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod,
35HttpClient client,
74HttpClient client,
116HttpClient client,
136private static async ValueTask<Stream> GetLengthLimitReadStreamAsync(HttpClient client, ValueTask<Stream> task)
System\Net\Http\Json\HttpClientJsonExtensions.Delete.cs (13)
18private static readonly Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> s_deleteAsync =
33public static Task<object?> DeleteFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
48public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
63public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
78public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
91public static Task<object?> DeleteFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) =>
104public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) =>
117public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) =>
130public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) =>
144public static Task<object?> DeleteFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, CancellationToken cancellationToken = default) =>
158public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, CancellationToken cancellationToken = default) =>
172public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken = default) =>
186public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpClientJsonExtensions.Get.cs (13)
18private static readonly Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> s_getAsync =
23public static Task<object?> GetFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
28public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
33public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
38public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
41public static Task<object?> GetFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) =>
44public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) =>
47public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) =>
50public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) =>
55public static Task<object?> GetFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, CancellationToken cancellationToken = default) =>
60public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, CancellationToken cancellationToken = default) =>
65public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken = default) =>
70public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpClientJsonExtensions.Patch.cs (6)
27public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default)
51public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default)
74public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, CancellationToken cancellationToken)
89public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken)
103public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
125public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpClientJsonExtensions.Post.cs (6)
16public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default)
29public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default)
42public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, CancellationToken cancellationToken)
47public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken)
50public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
61public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpClientJsonExtensions.Put.cs (6)
16public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default)
29public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default)
42public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, CancellationToken cancellationToken)
47public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken)
50public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
61public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System.Net.Requests (6)
System.Net.WebSockets.Client (1)
System.Private.Xml (1)
System.Windows.Forms (1)
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (2)