I've seen this question asked a few times but with no answer which seems to help or really fit my case. Here's my code first:
So here's my code; the value is always null no matter what I do, and by adding the [System.Web.Mvc.HttpPost] decoration I now get an error stating that the route doesn't support posts. I need some help.
[System.Web.Mvc.HttpPost]
public string Post(string value)
{
return value;
}
Here is what I'm posting via Postman; I'm putting this in the body:
"test"
No matter what I put in the body, the value of "value" is always null. I'm not sure what to do here, nothing seems to work. I even changed the decoration to just [HttpPost]. Gets work just fine for this controller, it's just the post which is failing miserably.