title: Is there a utility to serialise an object as HTTP content type "application/x-www-form-urlencoded"?
body: <p>I've never had to do this before, because it's always only been an actual form that I've posted as that content type, but recently I had to post three variables like that, and I resorted to a sordid concatenation with <code>&amp;</code> and <code>=</code>:</p>
  
  <pre class="lang-cs prettyprint-override"><code>var content = new StringContent("grant_type=password&amp;username=" + username + "&amp;password=" + password.ToClearString(), Encoding.UTF8,
      "application/x-www-form-urlencoded");
  </code></pre>
  
  <p>I'm sure there must be a utility method that would do that, and do it better, with any necessary encoding. What would that be?</p>