aliostad / CacheCow

An implementation of HTTP Caching in .NET Core and 4.5.2+ for both the client and the server
MIT License
847 stars 172 forks source link

Using CacheCow.Client with RestSharp #176

Closed gnompsky closed 7 years ago

gnompsky commented 7 years ago

Hi there is there any way to use CacheCow with the RestSharp client.

As far as I can see we need to add the CachingHandler to a HttpClient, however RestSharp uses WebRequests as far as I can tell. Is there some kind of bridge between these two libraries that I'm missing?

Thanks

aliostad commented 7 years ago

Hi,

I am afraid I have never used RestSharp but I do know it was designed before HttpClient. Since it does not play with the Web API request-response pipeline, I cannot see how it can work with it.

Does that answer your question?

gnompsky commented 7 years ago

Hi, Sadly yes. I think I'm going to dig around in both sources and see if I can work out a way to use CacheCow.

I'll let you know if I come up with anything that might be useful. Thanks,

aliostad commented 7 years ago

Cheers.