jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] MediaType parameters and the method selection

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 2 Oct 2013 11:36:31 +0100

Hi,

Can custom media type parameters affect the method selection, example

@Path("/")
public class Resource {

    @POST
    @Consumes("application/json")
    public void m1(SomeData data) {}
    @POST
    @Consumes("application/json;a=b")
    public void m2(SomeData data) {}

}

Request has:

Content-Type: application/json;a=b

Method m2 seems like a better candidate than m1, but is there anything
in the spec that would support the consistent selection of m2 ?

Cheers, Sergey