title: Pass parameters to HttpPost method of controller
body: <p>There something very basic i must be missing which i cant understand what it is.
  I have a method at the controller</p>
  
  <pre><code>    [Route("SomeMethod")]
      [HttpPost]
      public IActionResult SomeMethod([FromBody]int interval)
      {
          ...
      }
  </code></pre>
  
  <p>And im seing with postman post request <code>{"interval": 2000 }</code>, The interval at the controller is not initialized. If i change the method paramater to be object i get <code>ValueKind = Object : "{"interval": 2000 }"</code></p>
  
  <p>I also tried the parameter to be string and then the body i sent is <code>{"interval": "2000" }</code>, And at the controller i get null</p>
  
  <p>Based on this question i tried:</p>
  
  <pre><code>[Route("SomeMethod")]
  [HttpPost]
  public IActionResult SomeMethod([FromBody]JsonElement interval)
  {
      ...
  }
  </code></pre>
  
  <p>And got <code>ValueKind = Undefined : ""</code> At the contoroller, And also:</p>
  
  <pre><code>services.AddControllers()
          .AddNewtonsoftJson();
  </code></pre>
  
  <p>When the method expects an int and got 0</p>