As in, enforce a particular value in it?

Check here:
http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/130-restlet.html

which shows us we can get the value from the header by querying the
ClientInfo object like this:
request.getClientInfo().getAcceptedMediaTypes()

Which will return a list of the media types that were sent in that
header. What you do with that info is pretty application specific.
Perhaps a Filter that verifies the value in the "beforeHandle" method
and takes some action if the values are not favorable? That would be a
way to enforce it on every request. You could also verify it per
resource or some other solution.

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

Reply via email to