I am using an ASP.NET Core 3.0 MVC application in which I make the following jQuery Ajax call:
return $.ajax({
type: type,
url: '/' + controller + '/' + action,
data: jsonData,
timeout: timeout,
contentType: "application/json; charset=utf-8",
success: function (returnedData) {
successFunc(returnedData);
},
error: function (errMsg) {
errorFunc(errMsg);
}
});
passing it the data object
{
input1: 'random',
input2: '1',
input3: '1',
},
But it always passes null arguments through:
I have also tried adding addnewtonsoftjson() in startup but it doesn't seem to change anything.
A similar question here, doesn't really have an answer: .Net Core 3.0 AJAX POST Body Always Null