Annotation Interface Header


@Retention(RUNTIME) @Target({}) public @interface Header
Defines a custom HTTP header for WEB_SERVICE actions. Used within
invalid reference
Action#headers()
to specify additional headers.

Usage Example


 @ActionSpec(
     type = ActionType.WEB_SERVICE,
     endpoint = "https://api.example.com/data",
     headers = {
         @Header(key = "Accept", value = "application/json"),
         @Header(key = "Content-Type", value = "application/json")
     }
 )
 
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Header key (e.g., "Accept", "X-API-Key", "Content-Type")
    Header value.
  • Element Details

    • key

      String key
      Header key (e.g., "Accept", "X-API-Key", "Content-Type")
    • value

      String value
      Header value.