Annotation Type Headers


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface Headers
    Annotation to annotate list of static headers sent to a REST endpoint.

    Headers are comma separated strings, with each in the format of "header name: header value1,header value2".

    Examples:

     @Headers({"Content-Type: application/json; charset=utf-8", "accept-language: en-US"})
     @Post("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/"
         + "hubs/{hubName}/images/getEntityTypeImageUploadUrl")
     void getUploadUrlForEntityType(@PathParam("resourceGroupName") String resourceGroupName,
         @PathParam("hubName") String hubName,
         @PathParam("subscriptionId") String subscriptionId,
         @BodyParam("application/json") RequestBody parameters);
     
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String[] value
      List of static headers.
    • Element Detail

      • value

        String[] value
        List of static headers.
        Returns:
        List of static headers.