Try this ,
$.ajax({
headers: {
Accept: "text/plain; charset=utf-8",
"Content-Type": "text/plain; charset=utf-8"
},
data: "data",
success : function(response) {
// ...
}
});
See this post for reference:
Cannot properly set the Accept HTTP header with jQuery
Fixed : Uncaught SyntaxError: missing } after property list