@Documented @Target(value=PARAMETER) @Retention(value=RUNTIME) @Inherited public @interface Query
@FormData
, but only retrieves the parameter from the URL string, not URL-encoded form
posts.
Unlike @FormData
, using this annotation does not result in the servlet reading the contents of
URL-encoded form posts.
Therefore, this annotation can be used in conjunction with the @Body
annotation or
RestRequest.getBody()
method for application/x-www-form-urlencoded POST
calls.
This is functionally equivalent to the following code...
Modifier and Type | Optional Element and Description |
---|---|
String |
def
The default value for this query parameter if it's not present in the request.
|
boolean |
multipart
Specify
|
String |
name
URL query parameter name.
|
Class<? extends HttpPartParser> |
parser
Specifies the
HttpPartParser class used for parsing values from strings. |
String |
value
A synonym for
name() . |
public abstract boolean multipart
Normally, we expect single parameters to be specified in UON notation for representing collections of values
(e.g.
This setting should only be applied to Java parameters of type array or Collection.
public abstract Class<? extends HttpPartParser> parser
HttpPartParser
class used for parsing values from strings.
The default value for this parser is inherited from the servlet/method which defaults to UonPartParser
.
You can use SimplePartParser
to parse POJOs that are directly convertible from Strings
.
Copyright © 2018 Apache. All rights reserved.