title: Trying to reach API using Content-Type application/x-www-form-urlencoded
body: <p>I am building API restful server using dotnet core framework. I added my controller and trying to reach an endpoint using postman.</p>
  
  <p>I have 2 problems</p>
  
  <ul>
  <li><h3>Problem 1</h3>
  
  <pre><code>// POST api/user
  [HttpPost]
  [Authorize()]
   public async Task&lt;IActionResult&gt; Post([FromBody]UserModel user)
  {
  }
  </code></pre></li>
  </ul>
  
  <p>Unless I send the request from postman as <code>application/json</code> by typing raw json, I can't reach this endpoint if I use <code>application/x-www-form-urlencoded</code> instead I always get 415 unsupported media type</p>
  
  <ul>
  <li><h3>Problem 2</h3>
  
  <pre><code>// POST api/user/avatar
  [HttpPost]
  [Authorize()]
  [Route("avatar")]
  public async Task&lt;IActionResult&gt; Post([FromBody]UserModel user, [FromBody]IFormFile file)
  {
  }
  </code></pre></li>
  </ul>
  
  <p>I don't know how to reach such an endpoint using postman</p>