Apologies for the newbie question, but I am struggling a way to get the full contents of the HTTP Accept header received from the client web browser out of restlet (v 2.3.5) ?
This :
this.request.getHeaders().getFirstValue("Accept",true);
Does not work, I only get */* back.
I have also tried :
List<Preference<MediaType>> mediaTypes = this.request.getClientInfo().getAcceptedMediaTypes();
this.logger.debug(mediaTypes.toString());
for (Iterator it = mediaTypes.iterator();it.hasNext();) {
Preference<MediaType> preference = (Preference<MediaType>) it.next();
this.logger.debug(preference.toString());
}
Again, this only returns [*/*:1.0] and */*:1.0 respectively.