@Documented @Target(value=PARAMETER) @Retention(value=RUNTIME) @Inherited public @interface FormData
@RestMethod
annotated method to identify it as a form post
entry converted to a POJO.
This is functionally equivalent to the following code...
@Body
annotation or RestRequest.getBody()
method
for application/x-www-form-urlencoded POST
posts, since it will trigger the underlying servlet
API to parse the body content as key-value pairs resulting in empty content.
The @Query
annotation can be used to retrieve a URL parameter in the URL string without triggering the
servlet to drain the body content.
Modifier and Type | Optional Element and Description |
---|---|
String |
def
The default value for this form-data parameter if it's not present in the request.
|
boolean |
multipart
Specify
|
String |
name
FORM 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.