Annotation Interface RegisterClientHeaders


@Target(TYPE) @Retention(RUNTIME) @Documented public @interface RegisterClientHeaders
Used to specify that a ClientHeadersFactory should be used to generate or propagate HTTP headers on the outbound request. When annotation is placed at the interface level of a Rest Client interface, the implementation will invoke the ClientHeadersFactory's update method.

If no implementation class of the ClientHeadersFactory interface is specified in the annotation, then the DefaultClientHeadersFactoryImpl will be used. This implementation will simply propagate headers (specified via MP Config property) from an inbound JAX-RS request (if applicable) to the outbound request.

If a ClientHeadersFactory class specified is not found on the classpath, this should be considered a deployment exception.

Since:
1.2
  • Element Details

    • value

      Class<? extends ClientHeadersFactory> value
      Returns:
      the provider class to register on this client interface
      Default:
      org.eclipse.microprofile.rest.client.ext.DefaultClientHeadersFactoryImpl.class