Hello,

the Form class has several constructors that will help you, especially 
the one with a Representation and the one with a String.

>but wondering if there is a better way to be getting these key/value pairs, as 
>in the original GET example?

You can use the following kinds of "@Post" methods to retrieve the 
entity as a form:

   @Post
   public String accept(String value) {
       Form form = new form(value);
       [...]
   }

or

   @Post
   public String accept(Representation rep) {
       Form form = new form(rep);
       [...]
   }

or even simpler, because the default representation converter is able to 
detect encoded web forms

   @Post
   public String accept(Form form) {
       [...]
   }


I must add that there is a distinction between the query part of the 
resource's reference and the entity of a request. The former is part of 
the resource's identifier, and should not be seen only as a convenient 
way to convey data to the target resource.

Best regards,
Thierry Boileau


> Hi,
>
> I just was shown how to get the parameters of a GET request using the 
> following:
>
>    Form queryParams = getReference().getQuâEUR

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2460390

Reply via email to