'lo all,
I was wondering how content negotiation works (or is supposed to work)
with restlet?
I have a resource mounted at "/report" that has the various variants
set in its constructor:
setVariants(Arrays.asList(
new Variant(MediaType.APPLICATION_JSON),
new Variant(MediaType.APPLICATION_PDF)
));
If I request /report/test my resource is picked up and
represent(variant) is called with a media type of application/json,
however if I request /report/test.pdf - application/json is still
used. Is there something I need to do in order for my resource to be
called with an application/pdf media type? Is it because my mount is
only /report and I'm working on the assumption my request is being
matched? Would it work if I mounted against /report/${reportId}?
Cheers,
Mark
...and then Buffy staked Edward. The End.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1310988