Hello Daniele, @Post("txt")
should accept strings. Test it though ;-) On Tue, Mar 22, 2011 at 1:07 PM, Daniele Dellafiore <ilde...@gmail.com> wrote: > Hi. > > I built a server resource with a > > @Post > public void request(final String email) { ....} > > that works great with the restlet client. With a real form I have two > options: json/xml, say json, or post parameters. > > Json, I just add > > @Post("json") > public void xml(final Representation representation) { ...} > > in which parse the email from the json and call the request(String email) so > I do not duplicate code. > There is a problem here: the application/json post does not end in the > @Post("json"), everything falls in the first @Post. > If I remove the annotation from the first method, everything works. > > There is a notation to say to the first method he is waiting for a String > class? > > Thanks. > -- > Daniele Dellafiore > http://danieledellafiore.net > -- Fabián Mandelbaum IS Engineer ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2713282