尝试将其添加到您的ajax调用中,它应该可以修复不受支持的响应:
headers : { 'Accept' : 'application/json', 'Content-Type' : 'application/json'},这是对我有用的ajax调用的完整示例:
$.ajax({ dataType : "json", url : this.baseurl + "/dataList", headers : { 'Accept' : 'application/json', 'Content-Type' : 'application/json' }, data: JSON.stringify(params), type : 'POST', success : function(data) { self.displayResults(data); }, error : function(jqXHR,textStatus,errorThrown ){ showPopupError('Error','error : ' + textStatus, 'ok'); } });


