Annotation Interface Headers


@Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface Headers
Designates that a header will be added to the request. This header will contain the specified value, expanding any variables annotated with PathParam.
See Also:
  • invalid reference
    PathParam
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
    can be defined literally, or with enclosed variables (ex.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean[]
    Indicates whether a header should be URL encoded.
  • Element Details

    • keys

      String[] keys
      See Also:
      • invalid reference
        HttpHeaders
    • values

      String[] values
      can be defined literally, or with enclosed variables (ex. {variable})

      The inputs to these variables are taken from method parameters annotated with @PathParam.

      See Also:
      • invalid reference
        javax.ws.rs.PathParam
    • urlEncode

      boolean[] urlEncode
      Indicates whether a header should be URL encoded. Optional for backwards compatibility. The default behavior is that the header is not URL encoded.
      Default:
      {}