I have a resource that returns representations in either "text/html" or
"application/json".

 

Everything works as expected when clients specify the "Accept" HTTP header.
Otherwise, the server returns JSON by default, whereas I want it to return
HTML. The question is how to do that.

 

A previous thread by Kevin Daly
(http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447
<http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2646
542> &dsMessageId=2646542) says that the default representation is
determined according to the order of plugins in the classpath. Is there a
programmatic way to specify the default representation, e.g. using Restlet
annotations?

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

Reply via email to