I have an ASP.NET Web API endpoint with controller action defined as follows :
[HttpPost]
public HttpResponseMessage Post([FromBody] object text)
Since Web API doesn't have out of box formatter for handling text/plain, some options:
Modify your action to have no parameters... reason is having parameters triggers request body de-serialization. Now you can read the request content explicitly by doing await Request.Content.ReadAsStringAsync() to get the string
Write a custom MediaTypeFormatter to handle 'text/plain'... it's actually simple to write in this case and you could keep the parameters on the action.