我必须从 iPad 跨请求访问 tomcat webapp,有时这可行,但如果您发送请求重复,tomcat 将返回一个412
代码。帮助!
ios的代码是
$.ajax({
type:"POST",
url:[this is not a link]("http://192.168.1.222:8080/cmcp/doLogin"),
timeout:600000,
data: JSON.stringify({userName:"admin",password:"admin"}),
dataType:"json",
contentType: "application/json",
success: function(nowData,textStatus,XMLHttpRequest )
{
},
error :function(msg) {
}
});