title: HttpPost with multiple string type parameters. Why both parameters are null?
body: <p>I have an API controller as follows:</p>
  
  <pre><code>[ApiController]
  [Route("test")]
  public class TestController : ControllerBase
  {
      [HttpPost]
      public IActionResult PostData(string param1, string param2)
      {
          if (string.IsNullOrEmpty(param1) || string.IsNullOrEmpty(param2))
          {
              return BadRequest();
          }
  
          string result = "result =  " + param1 + "." + param2;
          return new JsonResult(result );
      }
  }
  </code></pre>
  
  <p>When I try to access this from postman, I use following in the json body when composing the post request.</p>
  
  <pre><code>{
      "param1" : "abc",
      "param2": "def"
  }
  </code></pre>
  
  <p>However, this causes a 400 Bad Request. If I add a breakpoint on the <code>PostData</code> method, it's hitting the first line where I am doing a check on null or empty string and both the parameters are null. That leads me to think I am not properly constructing the json on the client side. Can someone point out what I may be doing wrong here?</p>