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(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String
      hubName, @Path("subscriptionId") String subscriptionId, @Body GetImageUploadUrlInputInner 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.