Would like to accept all requests independent on the Content-Type
set in header.
As an example a Content-Type
can be application/json
. By then setting:
@Consumes(MediaType.WILDCARD)
Will respond: HTTP 415 Unsupported Media Type
But if the consume is defined as a list with multiple items:
@Consumes({ MediaType.WILDCARD, MediaType.APPLICATION_SVG_XML })
The request is accepted: 200 OK
Any ideas why not the MediaType.WILDCARD
accepts application/json
?
Edit: Running javax.ws.rs-api-2.1.jar