我试图发送一个Ajax POST请求使用Jquery但我有400错误的请求错误。
这里是我的代码:
$.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); } });
它说:不能从请求构建资源。
我缺少什么?