I had the same problem in Fiddler. I already had Content-Type: application/json; charset=utf-8
or Content-Type: application/json
in the request header.
My request body was also a plain string, and in Fiddler I had written: {'controller':'ctrl'}
. This made the string parameter in my POST method be null
.
Fix: remember to use quotation marks, thereby indicating a string. That is, I fixed it by writing "{'controller':'ctrl'}"
. (Note: when writing JSON, either be sure to use apostrophes or escape the quotation marks like this: "{\"controller\":\"ctrl\"}"
).