This one is really weird. I\'ve multiple $.post() in the code but there is one dunno why sends the json parameters as x-www-form-urlencoded instead
this also works for me
$.ajax({
url: "mydomain.com/url",
type: "POST",
dataType: "xml/html/script/json", // expected format for response
contentType: "application/json", // send as JSON
data: JSON.stringify(data),
complete: function() {
//called when complete
},
success: function() {
//called when successful
},
error: function() {
//called when there is an error
},
});