I can\'t seem to get this to work... I have some jQuery like this on the client:
$.ajax({
type: \"POST\",
url: \"api/report/reportexists/\",
data
jQuery.ajax() by default sets the contentType to be application/x-www-form-urlencoded. You could send the request in application/json instead. Also, you should send your data as a string and it will get model bind to the report parameter for your post method:
$.ajax({
type: "POST",
url: "api/report/reportexists/",
contentType: "application/json",
data: JSON.stringify(reportpath),
success: function(exists) {
if (exists) {
fileExists = true;
} else {
fileExists = false;
}
}
});