File: _QueryParam.xml

package info (click to toggle)
resteasy 3.6.2-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 34,612 kB
  • sloc: java: 265,492; xml: 27,855; javascript: 405; jsp: 166; python: 101; sh: 15; sql: 3; makefile: 2
file content (38 lines) | stat: -rw-r--r-- 835 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<chapter id="_QueryParam">
<title>@QueryParam</title>

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

<para>

The @QueryParam annotation allows you to map a URI query string parameter or url form encoded parameter to your method invocation.
</para>
<para>

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

<programlisting>
@GET
public String getBooks(@QueryParam("num") int num) {
...
}
</programlisting>
</para>
<para>

Currently since RESTEasy is built on top of a Servlet, it does not distinguish between URI query strings or url form encoded parameters. Like PathParam, your parameter type can be an String, primitive, or class that has a String constructor or static valueOf() method.
</para>
<para>

</para>
<para>


</para>
</chapter>