Hello Ben,

from the client side, you can specify the accepted media types, by setting the 
HTTP "accept" header.
A Restlet client resource can do this as follow (explained in the wiki [1]) : 
cr.get(MediaType.APPLICATION_JSON).write(System.out);

or by updating its client data:
cr.getClientInfo().getAcceptedMediaTypes().add(new
Preference<MediaType>(MediaType.APPLICATION_JSON));

If the client is not able to update the accept header, there is a workaround, 
you can add a parameter to the query part of the resource's uri:
http://server/path/to/resource?media=json

If this does not work, please let us know, this is a bug.

Best regards,
Thierry Boileau

[1] 
http://wiki.restlet.​org/docs_2.0/13-rest​let/21-restlet/318-r​estlet/303-restlet.h​tml

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

Reply via email to