title: RestSharp.Portable HttpRequestException 500 (Internal Server Error) on iOS POST Request
body: <p>I am using the <a href="https://github.com/FubarDevelopment/restsharp.portable" rel="nofollow">RestSharp.Portable</a> PCL because I am building a cross-platform service manager that will wrap and make calls to RestSharp regardless of the platform I am on. </p>
  
  <p>I am trying to POST data using a Xamarin iOS unit test project and I can successfully make GET requests but when I try to do a POST it always fails. My web service also has Swagger documentation and I was able to POST data using that but never with this library. Is this a good example of how to call it for a POST request?</p>
  
  <p>When the client.Execute() method is invoked, it returns the error below. I also verified no network traffic occurs from the mobile client when proxying through Fiddler so it must be failing before it ever leaves the device.</p>
  
  <pre><code>var payload = new User()
  {
      FirstName ="Suzy",
      LastName = "Q",
      Age = 43
  };
  
  using (var client = new RestClient("http://mywebservice.com:8308"))
  {
      var request = new RestRequest("api/Accounts/Register", HttpMethod.Post);
      request.AddJsonBody (payload);
      var result = await client.Execute&lt;UserRegistrationResponse&gt;(request);
      var userId = result.Data.UserId;
  }
  </code></pre>
  
  <p><img src="https://cloud.githubusercontent.com/assets/1834711/7915486/d63b7afc-084b-11e5-9cd0-1fb6f66ae77e.png" alt="ios simulator screen shot jun 1 2015 10 46 06 am"></p>