title: HTTP Status 415 - Unsupported Media Type when doing POST
body: <p>So I was trying to do a <code>POST</code> using REST with <code>Postman</code> in Chrome, but after I hit send got error</p>
  
  <blockquote>
    <p>HTTP Status 415 - Unsupported Media Type</p>
  </blockquote>
  
  <p>My code and part of the screen shot is included, the pair for the <code>hashmap</code> I tried is <code>duration</code> and <code>150</code>. I am sure the URL is correct but don't know why the media type is not accepted.</p>
  
  <pre><code>@Path("activities")
  public class ActivityResource {
  
      @POST
      @Path("activity")
      @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
      @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
      public Activity createActivityParams(MultivaluedHashMap&lt;String,String&gt; formParams){
          return null;
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/QvdO8.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/L1tBU.png" alt="enter image description here"></p>