JSON
AJAX
在JSON
上没有给出正确的结果(issuccess:failed),而邮递员会给出正确的结果(issuccess:true)
AJAX
JSON
回复
和
邮递员 var jData = {};
jData.username = $scope.mobile;
jData.password = $scope.password;
jData.entrytoken="aaad1323dfd";
var $resData = null;
$.ajax({
url:url,
type: "POST",
ContentType: "application/json; charset=utf-8",
data:JSON.stringify(jData) ,
dataType: "json",
beforeSend: function () {
},
success: function (response) {
console.log(response);
},
error: function (jqXHR, textStatus, errorThrown) {
},
complete: function () {
}
});
结果
mvn clean install tomcat7:run