title: 400 Bad Request on Post .Net Core API via Ajax
body: <p>I am trying to call a simple method with ajax as follow:</p>
  
  <pre><code>[Route("v1/[controller]")]
  [ApiController]
  public class FooController : Controller
  {   [HttpPost]
      public FooDTO Add(Foo Foo)
      {
         FooDTO  objFooDTO   = null;
       }
  }
  
  public class Foo 
  {
      public int ID {get; set;}
      public string Title {get; set;}
  }
  </code></pre>
  
  <p>Ajax request is as follow: </p>
  
  <pre><code>var obj = {
              "ID": 0,
              "Title": "Foo Bar"
          }
      $.ajax({
          type: "POST",
          url: "http://localhost:8001/v1/Foo",
          data: obj,
          async: false,
          dataType: "Json",
          crossDomain: true,
          contentType: 'application/x-www-form-urlencoded',
          cache: false,
          success: function (resp) {
  
          },
          error: function (e) {
  
          }
      });
  </code></pre>
  
  <p>Its working fine with <code>POSTMAN</code> but when I try to hit via ajax error is <code>400</code> Bad request <code>The input is not valid</code>. Is there anything which I am missing ? <code>jquery</code> version is <code>1.12.0</code>.</p>