title: How to access POST parameters in HttpServletRequest?
body: <p>I've got an app that's basically a proxy to a service. The app itself is built on Jersey and served by Jetty. I have this Resource method:</p>
  
  <pre><code>@POST
  @Path("/{default: .*}")
  @Timed
  @Consumes("application/x-www-form-urlencoded")
  public MyView post(@Context UriInfo uriInfo, @Context HttpServletRequest request) {
    ...
  }
  </code></pre>
  
  <p>A user submits a POST form. All POST requests go through this method. The UriInfo and HttpServletRequest are injected appropriately except for one detail: there seem to be no parameters. Here is my request being sent from the terminal:</p>
  
  <pre><code>POST /some/endpoint HTTP/1.1
  Accept: */*
  Accept-Encoding: gzip, deflate
  Connection: keep-alive
  Content-Length: 15
  Content-Type: application/x-www-form-urlencoded; charset=utf-8
  Host: localhost:8010
  User-Agent: HTTPie/0.9.2
  
  foo=bar&amp;biz=baz
  </code></pre>
  
  <p>Here the POST body clearly contains 2 parameters: foo and biz. But when I try to get them in my code (<code>request.getParameterMap</code>) the result is a map of size 0.</p>
  
  <p>How do I access these parameters or this parameter string from inside my resource method? If it matters, the implementation of <code>HttpServletRequest</code> that is used is org.eclipse.jetty.server.Request.</p>