While using json.stringify, post requests were blocked in the custom domain.
$.ajax({
type: 'post',
url: 'Your-URI',
data: JSON.stringify(empDetails),
contentType: "application/json; charset=utf-8",
success: function (data) {
...
}
});
to resolve the issue we commented the json data type, content type and passed object type to the data attribute.
$.ajax({
type: 'post',
url: 'Your-URI',
data: empDetails,
traditional: true,
success: function (data) {
...
}
});