Hi Jon,

The first idea is that forms should normally be processed inside a 
ServerResource. Using annotated methods, it is easy to retrieved  the Form 
instance as an input parameter of your method for example.

@Post
public void submit(Form form){
    ...
}

In filters, there are other common types of entity that you might want to 
retrieve, so there is no reason why it should have a special treatment. Note 
that you can still retrieve the query string as a form using 
Request#getResourceRef().getQueryAsForm()

Best regards,
Jerome
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.o​rg
Noelios Technologies ~ http://www.noelios.com




-----Message d'origine-----
De : Jonathan Hall [mailto:[email protected]] 
Envoyé : vendredi 10 septembre 2010 18:07
À : [email protected]
Objet : Deprecated Request.getEntityAsForm()

Hi,

I was wondering the reason why Request.getEntityAsForm() is now deprecated?

I realise you can use getQuery() in a resource, but what about Filters, where 
that method doesn't exist.
I can use new Form(getRequest().getEntity()), but it seems a step backward for 
such a common usecase.

Jon

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

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

Reply via email to