Annotation Interface RequestHeader


Apply to Resource Method parameters to enable HTTP request header injection.

Refer to documentation at https://www.soklet.com/docs/request-handling#headers for details.

Author:
Mark Allen
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the HTTP request header.
    boolean
    Is this HTTP request header optional or required?
  • Element Details

    • name

      The name of the HTTP request header.

      If null or blank, defaults to the name of the Java method parameter if your application is built with the -parameters compiler option.

      Returns:
      the name of the HTTP request header to inject into this Resource Method parameter
      Default:
      ""
    • optional

      boolean optional
      Is this HTTP request header optional or required?
      Returns:
      true if optional, false if required
      Default:
      false