2 Feb 2011 18:06
Default representation again
Danny Leshem <dleshem <at> gmail.com>
2011-02-02 17:06:46 GMT
2011-02-02 17:06:46 GMT
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&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?
RSS Feed