I have started learning JAX-RS using jersey 2.x. I am trying to make a PUT request with curl:
curl -v -H "Content-Type: application/json" -X PUT -d "[10.0,10.0]" localhost:8080/location
But I am getting 415 Unsupported Media Type. For my JSON provider I am using Moxy
@PUT
@Consumes(MediaType.APPLICATION_JSON)
public Response setLocation(final List<Double> coordinates) {
}
Changing
List<Double>
to
List<String>
doesnot give the 415 error. I think there must be some issue with the parser!