I am building an application with C# and one of the requirements is that the headers have to contain very specific data. I have been working with the WebClient and HttpWebRequest classes in C# but both do not have the option to explicitly remove the Connection header. This is what I have tried:
WebClient
client.Headers.Remove("Connection");
client.Headers.Add("Connection", null); // if only...
HttpWebRequest
request.Connection = null;
request.Connection = "";
Some of what I have read is that you can only have this header set to Keep-Alive or Close. I need it to not even be on the web request.
All other required headers are adding just fine. It is this one that is causing a head ache. I'm beginning to believe that removing the Connection header is not possible. Is there any language where it is possible if this is the case?
Much appreciation for the time you guys take to look at this!
Thank you!