title: REST passing Parameters with Java
body: <p>I've built a REST webservice with some webmethods.
  But I don't get it to work passing parameters to these methods.</p>
  
  <p>I.E.</p>
  
  <pre><code>@GET
  @Path("hello")
  @Produces(MediaType.TEXT_PLAIN)
  public String hello(String firstName, String lastName){
  
      return "Hello " + firstname + " " + lastname
  }
  </code></pre>
  
  <p>How would I invoke that method and how to pass the parameters firstname and lastname?
  I tried something like this:</p>
  
  <pre><code>ClientConfig config = new DefaultClientConfig();
  
  Client client = Client.create(config);
  
  WebResource service = client.resource(getBaseURI());
  
  ClientResponse response = service.path("hello")
  .accept(MediaType.TEXT_PLAIN).put(ClientResponse.class);
  </code></pre>
  
  <p>But where do I add the parameters?</p>
  
  <p>Thank you for your help,
  best regards,
  Chris</p>