title: Http post request with Content-Type: application/x-www-form-urlencoded
body: <p>How to sent POST request with content-type = application/x-www-form-urlencoded.
  Given an access code, I am trying to get the AccessToken using POST request where I have all the information set in POST URL so i don't know what to pass as Http content in the postAysnc method.</p>
  
  <p>According to another post For application/x-www-form-urlencoded, the body of the HTTP message sent to the server is essentially one giant query string -- name/value pairs are separated by the ampersand (&amp;), and names are separated from values by the equals symbol (=). An example of this would be: </p>
  
  <p>MyVariableOne=ValueOne&amp;MyVariableTwo=ValueTwo.</p>
  
  <p>So I have similar case where my POST url has all the information as querystring, in that case I don't know what to pass as HttpContent in the postAysnc method since its a mandatory parameter </p>
  
  <p>HttpClient client = new HttpClient();
  StringContent queryString = new StringContent(data);
  HttpResponseMessage response = await client.PostAsync(new Uri(url), queryString ); </p>