Annotation Interface FormParam


@Retention(RUNTIME) @Target(PARAMETER) public @interface FormParam
Injects an individual form field or a complete form object into a handler method parameter.

The request must use application/x-www-form-urlencoded or multipart/form-data.

Examples:


 @HandlePost("/newsletter")
 void subscribe(@FormParam String email) { ... }

 @HandlePost("/user")
 UserId createUser(@FormParam UserForm form) { ... }
 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Form parameter name.
  • Element Details

    • value

      String value
      Form parameter name. If left empty, it defaults to the method parameter's name;
      Default:
      ""