title: Restlet, An example of a get with parameters
body: <p>Just startred using restlet with java and was pleasently surprised how easy it was. However this was with puts. I then started to work with get but couldn't work out how to pass infromation with the get. </p>
  
  <p>With the put it was easy as:</p>
  
  <pre><code>@Put
  public Boolean store(Contact contact);
  </code></pre>
  
  <p>But when i try and do this with get it doesnt work. From reading around i think i have to not pass it any parameters and just have this:</p>
  
  <pre><code>@Get
  public Contact retrieve();
  </code></pre>
  
  <p>and then pass the parameters in a url or something?
  But i cant find any info on how to do this. As with put i could just use:</p>
  
  <pre><code>resource.store(user1);
  </code></pre>
  
  <p>Any help please? </p>
  
  <p>Im pretty sure this is the kind of thing i just need to see an example of and then ill be able to do it easily. Example of how to get the infromation out of the url at the other side would be very helpful aswell.</p>
  
  <p>Thanks</p>
  
  <p>I now have on my client side:</p>
  
  <pre><code>String username = "tom";
  ClientResource cr2 = new ClientResource("http://.../ContactManager/contacts/" + username);
  ContactResource resource2 = cr2.wrap(ContactResource.class);
  resource2.logIn();
  </code></pre>
  
  <p>On the server side i have:</p>
  
  <pre><code>@Get
  public Contact logIn(){
      System.out.println("name is " + resource.getAttributes().get("contactId"));     
      return null;
  }
  </code></pre>
  
  <p>But i am not sure what resource is? It doesnt exist in my program and am not sure what type it needs to be or where to declare it.</p>