title: Sending connection header set as keep-alive
body: <p>I'm trying to send the same information from  my application as I send from the browser. Here is part of data captured by Fiddler:</p>
  
  <pre><code>POST http://something/ HTTP/1.1
  Host: something.com
  Connection: keep-alive
  </code></pre>
  
  <p>I got stuck with this connection property. If I set the property keep-alive to true, in Fiddler I see this:</p>
  
  <p>Proxy-Connection: Keep-Alive</p>
  
  <p>If I try to set the connection property to Keep-alive, I get this error:</p>
  
  <p>Keep-Alive and Close may not be set using this property.</p>
  
  <p>How to write the code so that in Fiddler I can see this:</p>
  
  <p>Connection: keep-alive</p>
  
  <p>My full code:</p>
  
  <pre><code>HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://myUrl ");
  request.Method = "POST";
  request.ProtocolVersion = HttpVersion.Version11;
  request.Accept = "*/*";
  WebHeaderCollection headers = new WebHeaderCollection();
  headers.Add("Accept-Encoding", "myEncoding");
  headers.Add("Accept-Language", "myLang");
  request.Headers = headers;
  request.ContentType = "myContentType";
  request.Referer = "myReferer";
  request.UserAgent = "myUserAgent";
  ASCIIEncoding encoding = new ASCIIEncoding();
  string postData = "myData";
  byte[] data = encoding.GetBytes(postData);
  request.GetResponse().Close();
  </code></pre>