<chapter id="_HeaderParam">
<title>@HeaderParam</title>

<para>

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

GET /books?num=5
</para>
<para>

<programlisting>
   
   @GET
   public String getBooks(@HeaderParam("From") String from) {
   ...
   }
</programlisting>
</para>
<para>

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:
</para>
<para>

<programlisting>

   @PUT
   public void put(@HeaderParam("Content-Type") MediaType contentType, ...)
</programlisting>
</para>
<para>

</para>
<para>


</para>
</chapter>
