-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Net.Http
Milestone
Description
I want to use custom HttpConnectionSettings for my requests since I need to decrease DefaultMaxConnectionsPerServer. As far as I know HttpConnectionSettings are only exposed when creating a new SocketsHttpHandler. However if I create a new handler with custom settings and use the handler as message handler for my HttpClient I lose my dependency tracking.
Upon debugging I noticed that the default message handler is HttpClientHandler which includes a DiagnosticsHandler that is not publicly exposed.
How can I customize HttpConnectionSettings while still seeing request diagnostics?
I don't necessarily want to copy DiagnosticsHandler into my code to accomplish this.
On first glance I could see two possible solutions:
- Expose
DiagnosticsHandlerpublicly, so consumers can wrap their custom HttpHandlers with it. - Provide a way to customize
HttpConnectionSettingswithout creating a new message handler, so consumers can use theHttpClientHandlerwhile still being able to configure connection behavior.
ctaggart, cijothomas, JamesNK, assyadh, IGx89 and 2 moreTimothyMothra, Tratcher, paulomorgado and assyadh
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Net.Http