I'm a new jser and now I have trouble in how to realize ajax POST and GET. I can POST and GET the data through google postman like that .
but I am failed to get the data through jquery ajax, the error is 'Uncaught SyntaxError: Unexpected token :'. It get response but jump to the error function. I find many solution but could I realize to POST and GET without changing the background interface just like the Google postman?
$(function(){
$.ajax({
url: "http://115.29.203.53:10013/students",
type: "GET",
async: false,
dataType: "jsonp",
success: function(json){
console.log(json);
},
error: function(){
}
});
});
Thanks for reading my question and please forgive my broken English!