title: Internal Server Error when doing a POST with HttpClient in Windows Phone 8
body: <p>I am posting a string to a web server this way:</p>
  
  <pre><code>private async Task makeRequest(string url, string postData)
      {
          HttpClient client = null;
          HttpResponseMessage response = null;
          try
          {
              client = new HttpClient();
              response = await client.PostAsync(url, new StringContent(postData));
  
              response.EnsureSuccessStatusCode();
              Debug.WriteLine(response.StatusCode + " " + response.ReasonPhrase);
          }
          catch (HttpRequestException e)
          {
              Debug.WriteLine(e.Message);
          }
      }
  </code></pre>
  
  <p>But <code>response.EnsureSuccessStatusCode();</code> throws a <code>HttpRequestException</code>. When I did a <code>e.Message</code> on the exception, it says : <code>Response status code does not indicate success: 500 (Internal Server Error).</code>.</p>
  
  <p>What am I doing wrong that I get that error? And how do I correct it?</p>