如果你查看请求标题,你会注意到:
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
这是json数据的不正确类型.
您需要设置正确的内容类型并序列化数据:
$.ajax({ type: "POST", url: "/api/articles/", data: JSON.stringify(data), sucess: function() { console.log("Success!"); }, contentType: "application/json; charset=utf-8", dataType: "json", crossDomain:false, beforeSend: function(xhr, settings) { xhr.setRequestHeader("X-CSRFToken", csrftoken); } });