18 types derived from HttpMessageHandler
Microsoft.Arcade.Common (1)
ArcadeHttpMessageHandler.cs (1)
11public class ArcadeHttpMessageHandler : HttpMessageHandler
Microsoft.Arcade.Test.Common (1)
FakeHttpClient.cs (1)
19private class FakeHttpMessageHandler : HttpMessageHandler
Microsoft.AspNetCore.Authentication.Test (7)
OpenIdConnect\OpenIdConnectChallengeTests.cs (1)
968class ParMockBackchannel : HttpMessageHandler
OpenIdConnect\OpenIdConnectEventTests.cs (1)
1389private class TestBackchannel : HttpMessageHandler
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (1)
1384private class TestBackchannel : HttpMessageHandler
OpenIdConnect\TestSettings.cs (1)
316private class MockBackchannel : HttpMessageHandler
TestHttpMessageHandler.cs (1)
8public class TestHttpMessageHandler : HttpMessageHandler
WsFederation\WsFederationTest.cs (1)
448private class WaadMetadataDocumentHandler : HttpMessageHandler
WsFederation\WsFederationTest_Handler.cs (1)
444private class WaadMetadataDocumentHandler : HttpMessageHandler
Microsoft.AspNetCore.SignalR.Client.Tests (1)
TestHttpMessageHandler.cs (1)
17public class TestHttpMessageHandler : HttpMessageHandler
Microsoft.AspNetCore.TestHost (1)
ClientHandler.cs (1)
20public class ClientHandler : HttpMessageHandler
Microsoft.Build.Tasks.UnitTests (1)
DownloadFile_Tests.cs (1)
389private sealed class MockHttpMessageHandler : HttpMessageHandler
Microsoft.Extensions.Http.Polly.Tests (1)
PolicyHttpMessageHandlerTest.cs (1)
438private class TestHandler : HttpMessageHandler
System.Net.Http (4)
System\Net\Http\DelegatingHandler.cs (1)
13public abstract class DelegatingHandler : HttpMessageHandler
System\Net\Http\HttpClientHandler.cs (1)
27public partial class HttpClientHandler : HttpMessageHandler
System\Net\Http\SocketsHttpHandler\HttpMessageHandlerStage.cs (1)
9internal abstract class HttpMessageHandlerStage : HttpMessageHandler
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (1)
19public sealed class SocketsHttpHandler : HttpMessageHandler
System.Net.Http.WinHttpHandler (1)
artifacts\obj\System.Net.Http.WinHttpHandler\Debug\net10.0\System.Net.Http.WinHttpHandler.notsupported.cs (1)
22public partial class WinHttpHandler : System.Net.Http.HttpMessageHandler
184 references to HttpMessageHandler
Binding.Http.IntegrationTests (3)
HttpBindingTestHelpers.cs (3)
16bindingParameters.Add(new Func<HttpClientHandler, HttpMessageHandler>(GetHttpMessageHandler)); 25public HttpMessageHandler GetHttpMessageHandler(HttpClientHandler httpClientHandler) 39public InterceptingHttpMessageHandler(HttpMessageHandler innerHandler, HttpMessageHandlerBehavior parent)
Binding.ReliableSession.IntegrationTests (3)
src\System.Private.ServiceModel\tests\Scenarios\Binding\Http\HttpBindingTestHelpers.cs (3)
16bindingParameters.Add(new Func<HttpClientHandler, HttpMessageHandler>(GetHttpMessageHandler)); 25public HttpMessageHandler GetHttpMessageHandler(HttpClientHandler httpClientHandler) 39public InterceptingHttpMessageHandler(HttpMessageHandler innerHandler, HttpMessageHandlerBehavior parent)
ClientSample (1)
LoggingMessageHandler.cs (1)
20public LoggingMessageHandler(ILoggerFactory loggerFactory, HttpMessageHandler innerHandler) : base(innerHandler)
dotnet-svcutil-lib (11)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpMessageHandlerFactory.cs (11)
15/// Default HTTP message handler factory used by <see cref="HttpChannelListener"/> upon creation of an <see cref="HttpMessageHandler"/> 33/// <see cref="HttpMessageHandler"/> instance. 35/// taking exactly one argument of type <see cref="HttpMessageHandler"/>. The handlers are invoked in a 88/// to be invoked as part of an <see cref="HttpMessageHandler"/> instance. 111/// Creates an instance of an <see cref="HttpMessageHandler"/> using the HTTP message handlers 117public HttpMessageHandler Create(HttpMessageHandler innerChannel) 129/// Creates an instance of an <see cref="HttpMessageHandler"/> using the HTTP message handlers 134protected virtual HttpMessageHandler OnCreate(HttpMessageHandler innerChannel) 176HttpMessageHandler pipeline = innerChannel;
Microsoft.AspNetCore.Authentication (1)
RemoteAuthenticationOptions.cs (1)
72public HttpMessageHandler? BackchannelHttpHandler { get; set; }
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerOptions.cs (1)
83public HttpMessageHandler? BackchannelHttpHandler { get; set; }
Microsoft.AspNetCore.Authentication.Test (2)
GoogleTests.cs (1)
1088private HttpMessageHandler CreateBackchannel()
OpenIdConnect\TestSettings.cs (1)
29public TestSettings(Action<OpenIdConnectOptions> configure, HttpMessageHandler backchannel = null)
Microsoft.AspNetCore.HeaderPropagation.Tests (1)
HeaderPropagationIntegrationTest.cs (1)
194private async Task<IHost> CreateHost(Action<HeaderPropagationOptions> configure, HttpMessageHandler primaryHandler, Action<HeaderPropagationMessageHandlerOptions> configureClient = null)
Microsoft.AspNetCore.Http.Connections.Client (6)
HttpConnection.cs (1)
556HttpMessageHandler httpMessageHandler = httpClientHandler;
HttpConnectionOptions.cs (2)
65public Func<HttpMessageHandler, HttpMessageHandler>? HttpMessageHandlerFactory { get; set; }
Internal\AccessTokenHttpMessageHandler.cs (1)
17public AccessTokenHttpMessageHandler(HttpMessageHandler inner, HttpConnection httpConnection) : base(inner)
Internal\Http2HttpMessageHandler.cs (1)
18public Http2HttpMessageHandler(HttpMessageHandler inner) : base(inner) { }
Internal\LoggingHttpMessageHandler.cs (1)
18public LoggingHttpMessageHandler(HttpMessageHandler inner, ILoggerFactory loggerFactory) : base(inner)
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
3601public GetNegotiateHttpHandler(HttpMessageHandler handler, MemoryStream stream)
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
TestingInfrastructureTests.cs (1)
266public TestHandler(HttpMessageHandler innerHandler) : base(innerHandler)
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
493var serverHandler = _server.CreateHandler();
Microsoft.AspNetCore.Server.IntegrationTesting (3)
Common\DeploymentResult.cs (2)
60/// but using the provided <see cref="HttpMessageHandler"/> and the underlying handler. 64public HttpClient CreateHttpClient(HttpMessageHandler baseHandler) =>
Common\LoggingHandler.cs (1)
13public LoggingHandler(ILoggerFactory loggerFactory, HttpMessageHandler innerHandler) : base(innerHandler)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (3)
IISDeploymentResult.cs (1)
37public HttpClient CreateClient(HttpMessageHandler messageHandler)
LoggingHandler.cs (1)
15public LoggingHandler(HttpMessageHandler innerHandler, ILogger logger)
RetryHandler.cs (1)
17public RetryHandler(HttpMessageHandler innerHandler, ILogger logger)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
HubConnectionTests.cs (1)
2974public PollTrackingMessageHandler(HttpMessageHandler innerHandler) : base(innerHandler)
Microsoft.AspNetCore.SignalR.Client.Tests (28)
HttpConnectionFactoryTests.cs (2)
79Func<HttpMessageHandler, HttpMessageHandler> handlerFactory = handler => handler;
HttpConnectionTests.Helpers.cs (1)
20HttpMessageHandler httpHandler = null,
LongPollingTransportTests.cs (15)
33var mockHttpHandler = new Mock<HttpMessageHandler>(); 68var mockHttpHandler = new Mock<HttpMessageHandler>(); 102var mockHttpHandler = new Mock<HttpMessageHandler>(); 157var mockHttpHandler = new Mock<HttpMessageHandler>(); 184var mockHttpHandler = new Mock<HttpMessageHandler>(); 230var mockHttpHandler = new Mock<HttpMessageHandler>(); 276var mockHttpHandler = new Mock<HttpMessageHandler>(); 324var mockHttpHandler = new Mock<HttpMessageHandler>(); 367var mockHttpHandler = new Mock<HttpMessageHandler>(); 403var mockHttpHandler = new Mock<HttpMessageHandler>(); 461var mockHttpHandler = new Mock<HttpMessageHandler>(); 529var mockHttpHandler = new Mock<HttpMessageHandler>(); 585var mockHttpHandler = new Mock<HttpMessageHandler>(); 614var mockHttpHandler = new Mock<HttpMessageHandler>(); 640var mockHttpHandler = new Mock<HttpMessageHandler>();
ServerSentEventsTransportTests.cs (10)
29var mockHttpHandler = new Mock<HttpMessageHandler>(); 70var mockHttpHandler = new Mock<HttpMessageHandler>(); 122var mockHttpHandler = new Mock<HttpMessageHandler>(); 173var mockHttpHandler = new Mock<HttpMessageHandler>(); 228var mockHttpHandler = new Mock<HttpMessageHandler>(); 271var mockHttpHandler = new Mock<HttpMessageHandler>(); 302var mockHttpHandler = new Mock<HttpMessageHandler>(); 360var mockHttpHandler = new Mock<HttpMessageHandler>(); 387var mockHttpHandler = new Mock<HttpMessageHandler>(); 472var mockHttpHandler = new Mock<HttpMessageHandler>();
Microsoft.AspNetCore.SignalR.Tests (2)
EndToEndTests.cs (2)
172var mockHttpHandler = new Mock<HttpMessageHandler>(); 222var mockHttpHandler = new Mock<HttpMessageHandler>();
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
SpaProxyTests.cs (1)
21var messageHandler = new Mock<HttpMessageHandler>();
Microsoft.AspNetCore.TestHost (4)
TestServer.cs (4)
149/// Creates a custom <see cref="HttpMessageHandler" /> for processing HTTP requests/responses with the test server. 151public HttpMessageHandler CreateHandler() 161/// Creates a custom <see cref="HttpMessageHandler" /> for processing HTTP requests/responses with custom configuration with the test server. 163public HttpMessageHandler CreateHandler(Action<HttpContext> additionalContextConfiguration)
Microsoft.AspNetCore.Testing (1)
ServiceFakesHostExtensions.cs (1)
35public static HttpClient CreateClient(this IHost host, HttpMessageHandler? handler = null, Func<Uri, bool>? addressFilter = null)
Microsoft.Build.Tasks.Core (1)
DownloadFile.cs (1)
73internal HttpMessageHandler HttpMessageHandler { get; set; }
Microsoft.DotNet.Helix.Sdk (2)
FindDotNetCliPackage.cs (2)
58private HttpMessageHandler _httpMessageHandler; 67public bool ExecuteTask(HttpMessageHandler httpMessageHandler)
Microsoft.DotNet.Helix.Sdk.Tests (1)
FindDotNetCliPackageTests.cs (1)
229collection.AddScoped<HttpMessageHandler, ArcadeHttpMessageHandler>(mh =>
Microsoft.Extensions.AI.Integration.Tests (2)
VerbatimHttpHandler.cs (2)
13/// An <see cref="HttpMessageHandler"/> that checks the request body against an expected one 16public sealed class VerbatimHttpHandler(string expectedInput, string sentOutput) : HttpMessageHandler
Microsoft.Extensions.Http (57)
DefaultHttpClientFactory.cs (2)
107HttpMessageHandler handler = CreateHandler(name); 119public HttpMessageHandler CreateHandler(string name)
DefaultHttpMessageHandlerBuilder.cs (4)
16private HttpMessageHandler? _primaryHandler; 35public override HttpMessageHandler PrimaryHandler 45public override HttpMessageHandler Build() 57private HttpMessageHandler CreatePrimaryHandler()
DependencyInjection\HttpClientBuilderExtensions.cs (20)
144/// Adds a delegate that will be used to configure the primary <see cref="HttpMessageHandler"/> for a 148/// <param name="configureHandler">A delegate that is used to create an <see cref="HttpMessageHandler"/>.</param> 154public static IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this IHttpClientBuilder builder, Func<HttpMessageHandler> configureHandler) 168/// Adds a delegate that will be used to configure the primary <see cref="HttpMessageHandler"/> for a 172/// <param name="configureHandler">A delegate that is used to create an <see cref="HttpMessageHandler"/>.</param> 184public static IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this IHttpClientBuilder builder, Func<IServiceProvider, HttpMessageHandler> configureHandler) 198/// Configures the primary <see cref="HttpMessageHandler"/> from the dependency injection container 213where THandler : HttpMessageHandler 226/// Adds a delegate that will be used to configure the primary <see cref="HttpMessageHandler"/> for a 230/// <param name="configureHandler">A delegate that is used to configure a previously set or default primary <see cref="HttpMessageHandler"/>.</param> 238public static IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this IHttpClientBuilder builder, Action<HttpMessageHandler, IServiceProvider> configureHandler) 280/// <see cref="ConfigurePrimaryHttpMessageHandler(IHttpClientBuilder, Func{HttpMessageHandler})"/> or 317/// <see cref="ConfigurePrimaryHttpMessageHandler(IHttpClientBuilder, Func{HttpMessageHandler})"/> or 593/// Sets the length of time that a <see cref="HttpMessageHandler"/> instance can be reused. Each named 599/// The default implementation of <see cref="IHttpClientFactory"/> will pool the <see cref="HttpMessageHandler"/> 612/// <see cref="HttpClient"/> instances will prevent the underlying <see cref="HttpMessageHandler"/> from being 650/// Registers a named <see cref="HttpClient"/> and the related handler pipeline <see cref="HttpMessageHandler"/> as keyed 660/// means that the client will continue reusing the same <see cref="HttpMessageHandler"/> instance for the duration of <see cref="HttpClientFactoryOptions.HandlerLifetime"/>, 664/// WARNING: Registering the client as a keyed <see cref="ServiceLifetime.Transient"/> service will lead to the <see cref="HttpClient"/> and <see cref="HttpMessageHandler"/> 718/// Removes the keyed registrations for the named <see cref="HttpClient"/> and <see cref="HttpMessageHandler"/>.
DependencyInjection\HttpClientKeyedLifetime.cs (3)
32Handler = ServiceDescriptor.DescribeKeyed(typeof(HttpMessageHandler), ServiceKey, CreateKeyedHandler, lifetime); 69private static HttpMessageHandler CreateKeyedHandler(IServiceProvider serviceProvider, object? key) 75HttpMessageHandler handler = serviceProvider.GetRequiredService<IHttpMessageHandlerFactory>().CreateHandler(name);
ExpiredHandlerTrackingEntry.cs (1)
28public HttpMessageHandler InnerHandler { get; }
HttpClientFactoryOptions.cs (5)
36/// Gets or sets the length of time that a <see cref="HttpMessageHandler"/> instance can be reused. Each named 42/// The default implementation of <see cref="IHttpClientFactory"/> will pool the <see cref="HttpMessageHandler"/> 55/// <see cref="HttpClient"/> instances will prevent the underlying <see cref="HttpMessageHandler"/> from being 81/// create a dependency injection scope when building an <see cref="HttpMessageHandler"/>. 92/// each time it creates an <see cref="HttpMessageHandler"/>. The created scope has the same
HttpMessageHandlerBuilder.cs (12)
13/// A builder abstraction for configuring <see cref="HttpMessageHandler"/> instances. 17/// a transient service. Callers should retrieve a new instance for each <see cref="HttpMessageHandler"/> to 34/// Gets or sets the primary <see cref="HttpMessageHandler"/>. 36public abstract HttpMessageHandler PrimaryHandler { get; set; } 58/// Creates an <see cref="HttpMessageHandler"/>. 61/// An <see cref="HttpMessageHandler"/> built from the <see cref="PrimaryHandler"/> and 64public abstract HttpMessageHandler Build(); 67/// Constructs an instance of <see cref="HttpMessageHandler"/> by chaining <paramref name="additionalHandlers"/> one after another with <paramref name="primaryHandler"/> in the 71/// <param name="primaryHandler">An instance of <see cref="HttpMessageHandler"/> to operate at the bottom of the handler chain and actually handle the HTTP transport operations.</param> 81protected internal static HttpMessageHandler CreateHandlerPipeline(HttpMessageHandler primaryHandler, IEnumerable<DelegatingHandler> additionalHandlers) 91HttpMessageHandler next = primaryHandler;
HttpMessageHandlerFactoryExtensions.cs (3)
14/// Creates a new <see cref="HttpMessageHandler"/> using the default configuration. 17/// <returns>An <see cref="HttpMessageHandler"/> configured using the default configuration.</returns> 18public static HttpMessageHandler CreateHandler(this IHttpMessageHandlerFactory factory)
IHttpMessageHandlerFactory.cs (6)
9/// A factory abstraction for a component that can create <see cref="HttpMessageHandler"/> instances with custom 20/// Creates and configures an <see cref="HttpMessageHandler"/> instance using the configuration that corresponds 24/// <returns>A new <see cref="HttpMessageHandler"/> instance.</returns> 28/// <see cref="HttpMessageHandler"/> instances to improve performance. 32/// handler created, so disposing of the <see cref="HttpMessageHandler"/> returned by this method may 36HttpMessageHandler CreateHandler(string name);
LifetimeTrackingHttpMessageHandler.cs (1)
13public LifetimeTrackingHttpMessageHandler(HttpMessageHandler innerHandler)
Microsoft.Extensions.Http.Diagnostics.Tests (4)
Logging\Internal\TestHttpMessageHandlerBuilder.cs (2)
21public override HttpMessageHandler Build() => throw new NotSupportedException("Test"); 25public override HttpMessageHandler? PrimaryHandler { get; set; }
Logging\Internal\TestLoggingHandler.cs (2)
15public TestLoggingHandler(IHttpClientLogger logger, HttpMessageHandler? innerHandler) 20private static DelegatingHandler CreateInternalBclLoggingHandler(IHttpClientLogger logger, HttpMessageHandler? innerHandler)
Microsoft.Extensions.Http.Resilience.Tests (2)
Hedging\StandardHedgingTests.cs (1)
350private class MockHttpMessageHandler(string failingEndpoint) : HttpMessageHandler
Resilience\GrpcResilienceTests.cs (1)
25private HttpMessageHandler _handler;
Microsoft.Extensions.ServiceDiscovery (8)
Http\IServiceDiscoveryHttpMessageHandlerFactory.cs (5)
7/// Factory which creates <see cref="HttpMessageHandler"/> instances which resolve endpoints using service discovery 13/// Creates an <see cref="HttpMessageHandler"/> instance which resolve endpoints using service discovery before 17/// <returns>The new <see cref="HttpMessageHandler"/>.</returns> 18HttpMessageHandler CreateHandler(HttpMessageHandler handler);
Http\ResolvingHttpDelegatingHandler.cs (1)
34public ResolvingHttpDelegatingHandler(HttpServiceEndpointResolver resolver, IOptions<ServiceDiscoveryOptions> options, HttpMessageHandler innerHandler) : base(innerHandler)
Http\ServiceDiscoveryHttpMessageHandlerFactory.cs (2)
14public HttpMessageHandler CreateHandler(HttpMessageHandler handler)
Microsoft.Extensions.ServiceDiscovery.Yarp (2)
ServiceDiscoveryForwarderHttpClientFactory.cs (2)
12protected override HttpMessageHandler WrapHandler(ForwarderHttpClientContext context, HttpMessageHandler handler)
netstandard (1)
netstandard.cs (1)
1127[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.HttpMessageHandler))]
System.Net.Http (15)
System\Net\Http\DelegatingHandler.cs (3)
15private HttpMessageHandler? _innerHandler; 20public HttpMessageHandler? InnerHandler 40protected DelegatingHandler(HttpMessageHandler innerHandler)
System\Net\Http\DiagnosticsHandler.cs (2)
21private readonly HttpMessageHandler _innerHandler; 25public DiagnosticsHandler(HttpMessageHandler innerHandler, DistributedContextPropagator propagator, bool autoRedirect = false)
System\Net\Http\HttpClient.cs (2)
142public HttpClient(HttpMessageHandler handler) : this(handler, true) 146public HttpClient(HttpMessageHandler handler, bool disposeHandler) : base(handler, disposeHandler)
System\Net\Http\HttpMessageHandler.cs (1)
24throw new NotSupportedException(SR.Format(SR.net_http_missing_sync_implementation, GetType(), nameof(HttpMessageHandler), nameof(Send)));
System\Net\Http\HttpMessageInvoker.cs (4)
14private readonly HttpMessageHandler _handler; 16public HttpMessageInvoker(HttpMessageHandler handler) 21public HttpMessageInvoker(HttpMessageHandler handler, bool disposeHandler) 77static async Task<HttpResponseMessage> SendAsyncWithTelemetry(HttpMessageHandler handler, HttpRequestMessage request, CancellationToken cancellationToken)
System\Net\Http\MessageProcessingHandler.cs (1)
20protected MessageProcessingHandler(HttpMessageHandler innerHandler)
System\Net\Http\Metrics\MetricsHandler.cs (2)
14private readonly HttpMessageHandler _innerHandler; 18public MetricsHandler(HttpMessageHandler innerHandler, IMeterFactory? meterFactory, out Meter meter)
System.ServiceModel.Http (14)
System\ServiceModel\Channels\HttpChannelFactory.cs (3)
40private Func<HttpClientHandler, HttpMessageHandler> _httpMessageHandlerFactory; 129_httpMessageHandlerFactory = context.BindingParameters.Find<Func<HttpClientHandler, HttpMessageHandler>>(); 340HttpMessageHandler handler = clientHandler;
System\ServiceModel\Channels\HttpMessageHandlerFactory.cs (11)
16/// Default HTTP message handler factory used by <see cref="HttpChannelListener"/> upon creation of an <see cref="HttpMessageHandler"/> 34/// <see cref="HttpMessageHandler"/> instance. 36/// taking exactly one argument of type <see cref="HttpMessageHandler"/>. The handlers are invoked in a 85/// to be invoked as part of an <see cref="HttpMessageHandler"/> instance. 103/// Creates an instance of an <see cref="HttpMessageHandler"/> using the HTTP message handlers 109public HttpMessageHandler Create(HttpMessageHandler innerChannel) 121/// Creates an instance of an <see cref="HttpMessageHandler"/> using the HTTP message handlers 126protected virtual HttpMessageHandler OnCreate(HttpMessageHandler innerChannel) 168HttpMessageHandler pipeline = innerChannel;