title: Spring Boot Unsupported Media Type
body: <p>I am building some <strong>API</strong> with <strong>Spring Boot</strong>, but I get some errors about Content-Type when I try to query with Postman.</p>
  
  <pre><code>@RequestMapping(path = "/verify", method = RequestMethod.POST, consumes = "text/xml", produces = "application/json")
      String verify(@RequestBody Map&lt;String, Object&gt; payload, HttpServletRequest request) {}
  </code></pre>
  
  <p>I don't understand where there is the problem.</p>
  
  <p><strong>I noticed that the error disappears when I remove @RequestBody as parameter of method. Why?</strong></p>
  
  <p>I would simply:</p>
  
  <ul>
  <li>send XML to API </li>
  <li>receive JSON from API</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/YXJj1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YXJj1.png" alt="Postman call of API"></a></p>