BSiLabs / HttpTracer

MIT License
172 stars 13 forks source link

Is it possible to use this with RestSharp? #48

Closed saamerm closed 3 years ago

saamerm commented 3 years ago

I love HTTPTracer and use it for my http clients, but if I'm using RESTSharp, how can I use HttpTracer?

RestSharp using var client = new RestClient( instead of httpclient

ChaseFlorell commented 3 years ago

Thanks for the love @saamerm HTTPTracer just leverages HttpClients Chain of Responsibility pattern to apply additional logic around your http requests. A little bit of research shows that RestSharp doesn't actually use the HttpClient, but instead uses HttpWebRequest.

I'm not certain how you would inject your own Delegating Handler into their framework ¯\_(ツ)_/¯

https://github.com/restsharp/RestSharp/issues/1406

dylanberry commented 3 years ago

@saamerm While the restsharp team is working on migrating to HttpClient, I would recommend https://github.com/reactiveui/refit over RestClient if you have the choice.

ChaseFlorell commented 3 years ago

I'm going to close this issue as I believe HttpTracer will not work to support HttpWebRequest unless there is a community contribution