jQuery posts null instead of JSON to ASP.NET Web API
问题 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: JSON.stringify({ "report":reportpath }), success: function(exists) { if (exists) { fileExists = true; } else { fileExists = false; } } }); And in my Web.API controller I have a method like this: [HttpPost] public bool ReportExists( [FromBody]string report ) { bool exists = File.Exists(report); return exists; } I'm just checking to see if a file lives on