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

<note>
   <para>
      RESTEasy <link linkend="_NewParam">supports <code>@HeaderParam</code> annotations with no parameter name.</link>.
   </para>
</note>

<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>
