发现$.ajax如果加上Content-type,服务器将取不到req.body的数据
ajax设置的Header如下:
headers: {
Accept : "text/plain,application/json; charset=utf-8; version: 1.0",
"Content-Type": "application/json; charset=utf-8"
},
ajax设置的Header如下:
headers: {
Accept : "text/plain,application/json; charset=utf-8; version: 1.0",
"Content-Type": "application/json; charset=utf-8"
},