title: How to get text in stream from WebRequest?
body: <p>So, here's a scenario that I made up, in which I am making my own web browser and I want to make sure I'm sending correct POST text to web server.</p>
  
  <p>For that to be achieved, I need to get the POST text that WebRequest creates for me before I invoke <code>GetResponseStream()</code>.</p>
  
  <p>I tried to read through the stream from <code>WebRequest.GetRequestStream()</code>, but I assume that isn't a way to do that.</p>
  
  <p>I do NOT want plain HTML text responsed from web server.
  The POST text that I need to gain must look like something like this as follows :</p>
  
  <pre><code>POST http://www.some_web_server.com/default.aspx HTTP/1.1 
  Cache-Control : max-age=0 Connection : keep-alive .....
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p><strong>[UPDATE]</strong></p>
  
  <p>It's clear that I already have all fomulated <em>request</em>(POST) text in my WebRequest instance.</p>
  
  <p>Is there any way conveniently to just get the whole plain text from it, rather than using separated get properties such as <code>ContentType</code> or <code>Headers</code>?</p>
  
  <p>(Because I am lazy to 'assemble' all the headers that I specified into the whole complete POST text, which web server will eventually see.)</p>
  
  <pre><code>// This might be a very poor code to approach.
  
  public void Show_Full_POST_Text(WebRequest req)
  {
      // For example.
      String strRawText = req.GetRequestLiteral();
  
      // Your POST text looks like this!
      ShowToUser(strRawText);
  }
  
  public void Foo()
  {
      // ...
  
      Show_Full_POST_Text(req);
      var ResponseStream = req.GetResponseStream();
  
      // Continue.
  }
  </code></pre>