JBossWiki : HeaderParam
Wiki Home: HeaderParam [EN]
[Permalink]
[Recent Changes]
[History]
[RSS Feed][RDF Feed][Atom Feed][Print]

Your trail: HeaderParam

@HeaderParam

The @HeaderParam annotation allows you to map a request HTTP header to your method invocation.

GET /books?num=5

   
   @GET
   public String getBooks(@HeaderParam("From") String from) {
   ...
   }

Like PathParam, your parameter type can be an String, primitive, or class that has a String constructor or static valueOf() method. For example, MediaType? has a valueOf() method and you could do:


   @PUT
   public void put(@HeaderParam("Content-Type") MediaType contentType, ...)


Other languages:

Log in to make links between pages

The page last changed on Thu Jun 26 17:30:29 EDT 2008 by bill.burke@jboss.com