title: Construct GET Request for SslStream
body: <p>I apologise if this is a bit dim but I want to send something like this over an sslstream to a server that I have acquired a secure socket connection to...</p>
  
  <pre><code>GET /F5Check/qpi/1 HTTP/1.1
  Host: *****.com
  Connection: keep-alive
  Cache-Control: max-age=0
  User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Encoding: gzip,deflate,sdch
  Accept-Language: en-US,en;q=0.8
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
  </code></pre>
  
  <p>I tried using a string builder </p>
  
  <pre><code>var sb = new StringBuilder();
  sb.AppendLine("GET /F5Check/qpi/1 HTTP/1.1");
  sb.AppendLine(string.Format("Host: {0}", host));
  sb.AppendLine("Connection: keep-alive");
  sb.AppendLine("User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5");
  sb.AppendLine("Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
  sb.AppendLine("Accept-Encoding: gzip,deflate,sdch");
  sb.AppendLine("Accept-Language: en-US,en;q=0.8");
  sb.AppendLine("Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3");
  </code></pre>
  
  <p>and then doing this</p>
  
  <pre><code>//Translate the data.
  byte[] sendBuffer = UTF8Encoding.UTF8.GetBytes(sb.ToString());
  
  //Send the data.
  requestStream.Write(sendBuffer);
  </code></pre>
  
  <p>where sb is the stringbuilder object! </p>
  
  <p>I am simply not getting any response from the server when I try to read from the stream so clearly the server can't make any sense of my dumbass request!</p>
  
  <p>I know I could use variations of webrequest to do the same thing but there is a specific reason why I am trying to do this... </p>
  
  <p>Basically I need to know what to encode for sending so that I can effect a get request?</p>