I am trying to make ajax call. But Post call is giving 400 error at "xhr.send( options.hascontent && options.data null )" line.
Below is the code for reference:
$.ajax({
type: "POST",
url: "/Security/Login",
async: false,
contentType: false,
beforesend: function (xhr) {
xhr.setRequestHeader("X-XSRF-TOKEN", $('input:hidden[name =" __RequestVerificationToken"]').val());
},
datatype: "json",
data: "{'Hi'}",
processData: false,
success: function (response) {
},
complete: function (response) {
}
});