title: ASP.NET Core: POSTing complex type from jQuery always results in 'null' model
body: <p>I'm trying to POST to my ASP.NET Core (RC1) API from jQuery. It works fine when I POST via HttpClient, so I think it's only a stupid thing I'm missing.</p>
  
  <p>I can reproduce my problem on a vanilla default ASP.NET 5 project and this code.</p>
  
  <p><strong>Server</strong></p>
  
  <pre><code>namespace WebApplication1.Controllers
  {
      [Route("api/[controller]")]
      public class ValuesController : Controller
      {
          [HttpPost]
          public IActionResult Post([FromBody]Model input)
          {
              // input is always null
  
              return Json(input.Value);
          }
  
  
          public class Model
          {
              public string Value { get; set; }
          }
      }
  }
  </code></pre>
  
  <p><strong>Client</strong></p>
  
  <pre><code>$.ajax({
      url: "http://localhost:5000/api/values",
      method: "POST",
      contentType: "application/json",
      dataType: "json",
      data: JSON.stringify({
          Value: "some_value"
      })
  }).done(function(data) {
      console.log("Done.", data);                         
  });  
  </code></pre>
  
  <p>I played around by removing <code>[FromBody]</code>, that returns a model, but the properties were never populated. I also tried the many solutions and workarounds for similar problems on SO, but I think they don't apply to .NET Core or only solve problems usinf <code>[FromBody]</code> and simple types. For example <a href="https://stackoverflow.com/questions/14624306/web-api-parameter-always-null">Web Api Parameter always null</a> or <a href="https://stackoverflow.com/questions/19627045/using-jquery-post-to-asp-net-webapi">using jQuery post to ASP.Net webapi</a> or <a href="http://encosia.com/using-jquery-to-post-frombody-parameters-to-web-api/" rel="nofollow noreferrer">http://encosia.com/using-jquery-to-post-frombody-parameters-to-web-api/</a></p>