BSiLabs / HttpTracer

MIT License
172 stars 13 forks source link

Add constructor that doesn't set the InnerHandler so it can be used in HttpClientBuilder.AddHttpMessageHandler #54

Open maartenmensink opened 2 years ago

maartenmensink commented 2 years ago

Due to the fact that the constructor always sets the InnerHandler the HttpTracerHandler wont play nice with HttpClientBuilder.AddHttpMessageHandler<>() method.

A constructor overload or options allow the HttpTracerHandler to be construct with the InnerHandler not being set would fix this.

DanielCauser commented 1 year ago

Hey @maartenmensink, Ideally you'll not need to create instances of the handler if you are using the builder. The .Build() method returns an instance of the HttpTracerHandler to you, with all the inner handlers setup.