With an HTTP request containing "Accept: application/json", the Resource @Get 
method that is being called depends on the order of the functions as below:

Resource1 {
@Get
public Blah retrieve1() {//this gets called}
@Get("json")
public Blah retrieve2() {}
}


Resource2 {
@Get("json")
public Blah retrieve2() {//this gets called}
@Get
public Blah retrieve1() {}
}

Wouldn't it be nice if it preferred the @Get("json") method whenever I ask for 
application/json? 


The reason this is happening is, Variant's properties are used for content 
negotiation, whereas the annotation information is in VariantInfo, which is 
ignored in org.restlet.engine.util.Conneg.scoreVariant(Variant).

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

Reply via email to