<chapter id="_CookieParam">
<title>@CookieParam</title>

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

<para>

The @CookieParam annotation allows the injection of the value of a cookie or an object representation
   of an HTTP request cookie into a method invocation
</para>
<para>

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

<programlisting>
@GET
public String getBooks(@CookieParam("sessionid") int id) {
...
}

@GET
public String getBooks(@CookieParam("sessionid") jakarta.ws.rs.core.Cookie id) {...}
</programlisting>
</para>
<para>

Like PathParam, the parameter type can be a String, primitive, or class that has a String constructor
   or static valueOf() method.  It can also get an object representation of the cookie via the
   <code>jakarta.ws.rs.core.Cookie</code> class.
</para>
<para>

</para>
<para>


</para>
</chapter>
