Closed
Description
Steps:
- create a Console App(.net core 3.0)
- apply following code
static void Main(string[] args)
{
var url = "https://docs.microsoft.com/en-us/dotnet/api/system.net.cache.requestcachelevel?view=netframework-4.8";
var req = System.Net.HttpWebRequest.Create(url);
req.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.NoCacheNoStore);
var res = req.GetResponse();
}
- run sample.
Actual Behavior
It's observerd that http request header doesn't include the cache setting.
Expected Behavior
Runing with the same code in Console App against .net framework, we can get following request header.
My Question
- Is it a bug or by design?