I've had the same issue. The only workaround I've found is a bit cumbersome but
works:
@Get("json|html")
public Representation getRepresentation(Variant variant) {
if(variant.getMediaType().equals(MediaType.APPLICATION_JSON)
....
}
I'm not sure whether that's a regression or the intended behaviour...
Nicolas
On 24 Aug 2010, at 08:41, [email protected] wrote:
> In my ServerResource impl (on official restlet 2.0.0 GAE edition) I've got
> two annotated methods:
>
> @Get("json")
> public Representation getJson() { ...
>
> and
>
> @Get("html")
> public Representation getHtml() { ...
>
> When testing the resource with:
>
> curl -v -H 'Accept: application/json'
>
> the result is that getHtml is called returning text/plain
>
> So it seems the annotaion/negotiation isn't working... what could be causing
> this?
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2650559
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2651853