My ajax call looks like this:
我的ajax调用如下:
$.ajax({
url: "/doSomeCoolThingOnServer",
type: "POST",
async: false,
data: {
simple_string: "Variable sent from client side",
array_of_strings: ["John", "George"],
array_of_objects: [
{ city: "Shanghai", population: 1000 },
{ city: "Budapest", population: 2501 }
]
},
success: function(response) {
console.log("===== SUCCESS =====");
console.log(response);
},
error: function(response) {
console.log("===== ERROR =====");
console.log(response);
}
});