title: How to POST via $.ajax() to ASP.NET WEB API?
body: <p>I keep getting a null parameter once the WEB API method is hit.  What am I doing wrong?</p>
  
  <pre><code>var product = {
  name: "productA",
  Id: 22
  };
  
  $.ajax({
      url: 'http://localhost:50175/api/values/',
      type: 'POST',
      data: product
  })
  .success(function(data) {
      alert('success');
  })
  </code></pre>
  
  <p>WEB API</p>
  
  <pre><code>// POST api/values
  [HttpPost]
  public void Post([FromBody]Product value)
  {
      setResponse();
  }
  </code></pre>
  
  <p>Product class</p>
  
  <pre><code>public class Product
  {
      public string name { get; set; }
      public int Id { get; set; }
  }
  </code></pre>