Hi all,
This could be a REST understanding problem in general. I'm using JDK
1.5.10 with Restlet 1.0.8.
I have a resource that accepts GET requests for a User. The HTML
representation will return a FreeMarker page, and the Text version will
just return a String representation of the User. Simple and lovely.
I also want to be able to ask for the User object too, and I think that
the ObjectRepresentation class is used for that. How do I specify that
from the Resource though? I thought of narrowing down the ClientInfo's
accepted MediaTypes to just 'x-java-serialized-object' and checking for
that in the getRepresentation() method of the Resource, but it won't
accept requests with just that MediaType to choose from.
Any ideas of how to just return the Object? It seems like just another
representation, but I don't think I should have to create another
Resource as it's essentially doing the same thing as the HTML and
Textual representations are doing.
Thanks,
Dustin
--
Dustin N. Jenkins | Tel/Tél: 250.363.3101 | [EMAIL PROTECTED]
facsimile/télécopieur: (250) 363-0045
National Research Council Canada | 5071 West Saanich Rd, Victoria BC.
V9E 2E7
Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria
(C.-B) V9E 2E7
Government of Canada | Gouvernement du Canada