title: Getting 400 bad request error in Jquery Ajax POST
body: <p>I am trying to send an Ajax POST request using Jquery but I am having 400 bad request error.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$.ajax({
    type: 'POST',
    url: "http://localhost:8080/project/server/rest/subjects",
    data: {
      "subject:title":"Test Name",
      "subject:description":"Creating test subject to check POST method API",
      "sub:tags": ["facebook:work", "facebook:likes"],
      "sampleSize" : 10,
      "values": ["science", "machine-learning"]
    },
    error: function(e) {
      console.log(e);
    }
  });
  </code></pre>
  
  <p>It Says: Can not build resource from request.
  What am I missing ?</p>