I am trying to get POST data in C# and everything I have read says to use
Request.Form[\"parameterNameHere\"]
I am trying that, but I get
You should pass your object in the request body and retrieve values from the body:
public HttpResponseMessage Post([FromBody] SomeModel model)
{
var value = model.SomeValue;
...
Or if all you need is the string:
public HttpResponseMessage Post([FromBody] string value)
{
HttpResponseMessage response = new HttpResponseMessage();
response.Content = new StringContent("Your message to me was: " + value);
return response;
}