$.ajax({
headers: {
'Content-Type': 'application/json'
},
type: 'delete',
url: 'http://localhost:8090/student',//发送请求
data:JSON.stringify(strs),
success: function (result) { }
});
此处
headers: {
‘Content-Type’: ‘application/json’
}
是必须需要加上的。