title: RESTEasy - Reuse method parameters when @GET/@POST
body: <p>I have a method in my RESTEasy service which I'd like to use as both <code>@GET</code>/<code>@POST</code>, and its data may come from both query string and request body.</p>
  
  <pre><code>@GET
  @POST
  public String myMethod(@QueryParam("param1") @FormParam("param1") String param1,
                         @QueryParam("param2") @FormParam("param1") String param2) {
      // ...do things
  }
  </code></pre>
  
  <p>However, I haven't found yet a way to do this without doing the following:</p>
  
  <pre><code>@GET
  public String myMethod(@QueryParam("param1") String param1, @QueryParam("param2") String param2) {
      // ...do things
  }
  
  @POST
  public String myMethod2(@FormParam("param1") String param1, @FormParam("param2") String param2) {
      return this.myMethod(param1, param2);
  }
  </code></pre>
  
  <p>Does anyone knows how to make the first example work, or another approach with the least code possible?</p>