post时设置contentType和data

如果设置了

contentType: "application/json",

则data需要JSON.stringify一下

data: JSON.stringify({})

你可能感兴趣的:(post时设置contentType和data)