Annotation Type RequestBody


Annotation that may be placed on parameters of event handler methods, usually in page classes. Annotated parameters will be extracted fro the request body and converted to the parameter type using HttpRequestBodyConverter, which uses TypeCoercer as a fallback. An event handler method having more than one RequestBody parameter is considered an error.
Since:
5.8.0
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    If false (the default), then an exception is thrown when the request body is empty (i.e.
  • Element Details

    • allowEmpty

      boolean allowEmpty
      If false (the default), then an exception is thrown when the request body is empty (i.e. zero bytes). If true, then empty bodies are allowed and the parameter will receive a null value.
      Default:
      false