title: Sending NameValueCollection to http request C#
body: <p>I have this situation.
  We're using some method for login, but that method is on some higher abstraction level so it only have parameters like username and password and and that make some Name value collection with this params and than that passes to some request builder. This request builder is injected so that I can change it's implementation. Now we're using POST request, but in future we might use XML or JSON so will just switch the implementation of injected interface.</p>
  
  <p>The problem is that I cannot fine any library which will make me System.Net.HttpWebRequest out of this name value collection.
  I need method with prototype like this:</p>
  
  <pre><code>WebRequest / HttpWebRequest  CreateRequest(Uri / string, nameValueCollection);
  </code></pre>
  
  <p>Or if there is no something like that, the library that does all the work (sending requests, receiving responses and parsing them) will be good too. But it needs to be async.</p>
  
  <p>Thanks in advance.</p>