title: WebApi - action paramer is null when using [FromBody] attribute and POST method
body: <p>I have this controller and I can't figure out, why <code>name</code> parameter is null</p>
  
  <pre><code>public class DeviceController : ApiController
  {
      [HttpPost]
      public void Select([FromBody]string name)
      {
          //problem: name is always null
      }
  }
  </code></pre>
  
  <p>here is my route mapping:</p>
  
  <pre><code>public void Configuration(IAppBuilder appBuilder)
  {
      HttpConfiguration config = new HttpConfiguration();
      config.Routes.MapHttpRoute(
          name: "ActionApi",
          routeTemplate: "api/{controller}/{action}"
      );
  
      appBuilder.UseWebApi(config);
  }
  </code></pre>
  
  <p>and here is my request:</p>
  
  <pre><code>POST http://localhost:9000/api/device/Select HTTP/1.2
  User-Agent: Fiddler
  Host: localhost:9000
  Content-Length: 16
  Content-Type: application/json
  
  {'name':'hello'}
  </code></pre>
  
  <p>I also tried to change body to plain string: <code>hello</code>.</p>
  
  <pre><code>POST http://localhost:9000/api/device/Select HTTP/1.2
  User-Agent: Fiddler
  Host: localhost:9000
  Content-Length: 5
  Content-Type: application/json
  
  hello
  </code></pre>
  
  <p>The request returns 204 which is ok, but the parameter is never mapped to a posted value.</p>
  
  <p>*I'm using self hosted owin service.</p>