I\'ve read that in order to disable caching while using get and post methods in HttpClient, I need to use a WebRequestHandler as my HttpClien
I found 3 ways
string uri = "http://host.com/path?cache=" + Guid.NewGuid().ToString();
var __request = (HttpWebRequest)WebRequest.Create(url.ToString()); if (__request.Headers == null) __request.Headers = new WebHeaderCollection(); __request.Headers.Add("Cache-Control", "no-cache");
[AspNetCacheProfile("GetContent")] public ResultABC GetContent(string abc) { __request = (HttpWebRequest)WebRequest.Create(abc); return __request; }
And update your web.config
...