title: How to write controller class to allow content-type: application/json and application/x-www-form-urlencoded
body: <p>I am sending request to my controller class request as content-Type: application/json and application/x-www-form-urlencoded format It should allow both types.</p>
  
  <p>But when I am using request type as a application/x-www-form-urlencoded it is working but  when I use request application/json this code is not working it is giving 400 response status. How to solve this issue.</p>