$.ajax({
url: "./test.php",
type: "POST",
headers: {
"Accept" : "text/plain; charset=utf-8",
"Content-Type": "text/plain; charset=utf-8"
},
beforeSend: function(jqXHR, settings) {
jqXHR.setRequestHeader('Accept', 'text/plain; charset=utf-8');
jqXHR.setRequestHeader('Content-Type', 'text/plain; charset=utf-8');
},
data: {"user" : "min", "pass" : "he"},
error: function(jqXHR, textStatus, errorThrown) {
//....
},
success: function(data, textStatus, jqXHR) {
//....
}
}