Este conteúdo não está disponível no idioma selecionado.
Chapter 6. @HeaderParam
The
@HeaderParam annotation allows you to map a request HTTP header onto your method invocation.
GET /books?num=5
GET /books?num=5
As with
@PathParam, the type of parameter can be a primitive, a String, or a class with a String constructor or static valueOf() method. For example, MediaType has a valueOf() method, so you could do the following:
@PUT
public void put(@HeaderParam("Content-Type") MediaType contentType, ...)
@PUT
public void put(@HeaderParam("Content-Type") MediaType contentType, ...)