Hi all,

We're running into an issues regarding the scoring of entity variants on 
the client. We found out that ClientResource.handle(Method method, 
Object entity, Class<T> resultClass) scores the variants for POST 
entities by the accepted media type for the result entity. Why is that?

In our case the POST entity matches with a custom media type as well as 
JSON. The requested result type (String[]) matches with another custom 
media type and JSON as well. ClientResource chooses the JSON format over 
our custom format here because that format is also one of the accepted 
media types for the result. This looks like an odd choice me. I would 
expect the code just to look at the scores of the variants and pick the 
one with the highest score, or the first one of those if there are multiple.

Some insight in the reasoning behind this would be welcome.

Cheers,
Arjohn Kampman

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

Reply via email to