I think the issue was that I did not define my function to take a Form 
argument. It seems to work now:

@Post("form")
public Representation post(Form form) {
...
}

FYI: I was unclear what the post annotation argument referred to, the 
content-type in the Accept header of the request (which is what I thought, but 
is not correct) or the content-type of the request entity.

I am not sure if this was missing from the docs or if I'm just overwhelmed by 
too much information, but it could stand to be in the tutorials.


While I'm on the topic of the Docs (sorry to get off thread topic), this 
document shows an example of returning either JSON or XML or other types 
apparently on demand:

http://wiki.restlet.org/docs_2.1/13-restlet/21-restlet/318-restlet/303-restlet.html

I tried that from scratch, but it just returns a java object. I'm clearly 
missing something. I'll figure it out, or I'll start another thread topic when 
I can figure out a specific question, but I think the tutorial is missing some 
magic -- eg how does the Java object get converted to XML/JSON/whatever?

Again, I could be missing something obvious because I'm overwhelmed with GAE, 
Servlets and so on, but it seems like an amazing feature I'm missing.

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

Reply via email to