Package io.avaje.http.api
Annotation Type Form
-
@Target({PARAMETER,METHOD}) @Retention(RUNTIME) public @interface Form
A parameter that is a bean containing form parameters.The properties on the bean are by default treated as form parameters. If they have no other annotations like
@QueryParam
, or@Header
etc they are populated as form parameters.The properties can have other annotations like
@QueryParam
,@Header
,@Cookie
,@Default
.We would explicitly annotate a property with
@FormParam
if the form property name is snake case or similar that doesn't map to a valid java/kotlin variable.Example 1
Simple form bean, properties default to form parameters matching the property name.
{@code public class MyForm { public String id; public String name; } ...