title: Post Method in Windows Phone 8
body: <p>I need to send some parameters to a php server using post method in WP8 app and get response in json format. I've tried everything that I found on stackoverflow and other sites, still could not.</p>
  
  <p>The last code piece I come up with is:</p>
  
  <pre><code>public static async void GetData(string url, string data)
  {
      HttpClient client = new HttpClient();
      HttpResponseMessage response = await client.PostAsync(new Uri(url), new StringContent(data));
  
      response.EnsureSuccessStatusCode();
      string responseBody = await response.Content.ReadAsStringAsync();
      MessageBox.Show(responseBody); // just showing the response for now
  }
  </code></pre>
  
  <p>It shows a message from the server (which is an error stating some fields are missing) that it actually communicates with the server but the problem is with sending data. I call the above method like:</p>
  
  <pre><code>GetData("http_address_here", "?action=REGISTER&amp;email=asc@fsdf.com&amp;password=54561wefwe&amp;firstname=sdfsdf&amp;lastname=sdfsdf&amp;picture=10");
  </code></pre>
  
  <p>But I saw an example sending data in xml. Possibly the mistake is about calling the method. Having seen tens of sample codes and trying everything, I really got confused about it. Any help is appreciated.</p>