I am facing issue in Posting data using JQuery. It works fine when I do it through Chrome Extension Postman.
My Code
var request = $.ajax({
url: 'http://pankajserver.in/api/SaveRoleApi',
type: "POST",
data: {Role : "wsed"},
async: true,
contentType: "application/json; charset=utf-8",
"X-Requested-With": "XMLHttpRequest"
});
request.done(function(msg) {
debugger;
});
request.fail(function(jqXHR, textStatus) {
debugger;
});
Url: http://pankajserver.in/api/SaveRoleApi
contentType: "application/json; charset=utf-8"
X-Requested-With: "XMLHttpRequest"
Works fine when posted data with Postman Chrome Extension. Screenshot below