Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I do not understand fully what you want to do.
At the moment I do not plan to change how the HttpClient works!
However you can do whatever you want with Ocleot because all of its service are registered with TryAdd which means if you have already added the interface and implementation .net will not try to do it again.
This means that you can override any of the services.
IHttpRequester is responsible for returning the HttpResponseMessage to the Ocelot pipeline. Therefore you can provide your own implementation of this interface and register is before adding the ocelot services.
Alternatively if you want to contribute to Ocelot you could change HttpClientHttpRequester to take IHttpClientBuilder as a dependency and rather than new up HttpClientBuilder and override this.
I hope this helps.
now I need to take HttpTracingDelegatingHandler join in HttpClient
var _handlers = new Dictionary<int, Func>();
@jakey188 You can add me wechat geffzhang. I have added Httptracingdelegatinghandler https://github.com/geffzhang/Ocelot/blob/Monitoring/src/Ocelot/Tracing/OcelotHttpTracingHandler.cs , have basically completed and butterfly integration work, but there are test work and ocelot tracing buried point work to do, we can together to improve。 We are mainly here #19 to discuss this work
s.AddOcelot() .AddDelegatingHandler(() => new FakeHandler()) .AddDelegatingHandler(() => new FakeHandler());
The delegating handlers are run in order of addition so FIFO if you are using QoS feature of Ocelot that will always be last.
Let me know if you have any suggestions.