title: How to read post data from Stream object in C#
body: <p>I used to have a method in mvc application which can read the values from a post request. it was something like this.</p>
  
  <pre><code>[HttpPost]
  public ActionResult ResponseFromExternalParty(FormCollection form)
  </code></pre>
  
  <p>and I was able to read the values as </p>
  
  <pre><code>var authCode = form["auth_code"];
  </code></pre>
  
  <p>now I need to do the same in another application which is not a mvc application,
  therefore I cannot use FormCollection object. I was told to use Stream object, so my new method looks like </p>
  
  <pre><code> public void ResponseFromExternalParty(Stream form)
  </code></pre>
  
  <p>I cannot get my head around it as how to read post data from this Stream object. if I have to read querystring data I know I could have used something like </p>
  
  <pre><code>HttpUtility.ParseQueryString();
  </code></pre>
  
  <p>advance thanks for any help.</p>