javascript - Ajax Post Data {post: '[["test",null,null,null,"test"]]'},为什么这个请求返回 406
问题描述
POST Data > {post: '[["test",null,null,null,"test"]]'}
RETURN_CODE > 406
RETURN_MESSAGE > Not Acceptable! An appropriate representation of the requested resource could not be found on this server.
此错误是由 Mod_Security 生成的。
完整代码:
var xtest = [["test", null, null, null, "test"]];
var xtest1 = JSON.stringify(xtest);
$.ajax({
url: url,
data: {post: xtest1},
type: 'post',
success: function(result){
console.log(result);
}
});
这是一个错误还是我的代码错误?
注意:
- 在我的本地工作正常
- 在主机上显示 406