Hi Thierry, Thanks for your help.
Best, Zsolt On Mon, Feb 22, 2010 at 1:11 PM, Thierry Boileau <[email protected]> wrote: > Hello Zsolt, > > you can specify a default media type on the metadata service of the > application: > <your app>.getMetadataService().setDefaultMediaType(MediaType.TEXT_HTML); > > Best regards, > Thierry Boileau > >> Hello >> >> I'm sure I'm missing something trivial, but I can't figure it out. >> >> I have this simple interface: >> >> public interface EntryResource { >> �...@get("html") >> public Representation asHtml(); >> >> �...@get("json|xml") >> public Entry retrieve(); >> >> �...@put >> public void store(Entry entry); >> >> �...@delete >> public void remove(); >> } >> >> I have a server resource class which implements these methods (no @Get >> annotation there). When I don't set the Accept header in request, I >> always get application/json response. How can I set the preferred >> media type to text/html? >> >> When I set Accept: text/html, it returns the html representation. >> >> >> >> Thank you in advance >> >> zsolt >> >> ------------------------------------------------------ >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2449935 >> >> > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2450403 > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2450406

