public interface ClientHeadersFactory
updatewhich takes parameters of headers passed in from the incoming JAX-RS request (if applicable, if not, this will be an empty map) and a read-only map of headers specified by
HeaderParamannotations on the client interface.
This method should return a MultivaluedMap of headers to be merged with the outgoing headers. This will determine the final set of HTTP headers that will be sent to the outbound entity provider processing chain - thus any filters, MessageBodyWriters, interceptors, etc. could further refine the set of headers actually sent on the client request.
If the ClientHeadersFactory instance is invoked while in the context of a
JAX-RS request, the implementation may optionally support injection of fields
and methods annotated with
If the ClientHeadersFactory instance is managed by CDI (i.e. it is annotated
@ApplicationScoped, etc.), the implementation
must use the appropriate CDI-managed instance, and must support
|Modifier and Type||Method and Description|
Updates the HTTP headers to send to the remote service.
javax.ws.rs.core.MultivaluedMap<String,String> update(javax.ws.rs.core.MultivaluedMap<String,String> incomingHeaders, javax.ws.rs.core.MultivaluedMap<String,String> clientOutgoingHeaders)
incomingHeaders- - the map of headers from the inbound JAX-RS request. This will be an empty map if the associated client interface is not part of a JAX-RS request.
clientOutgoingHeaders- - the read-only map of header parameters specified on the client interface.
Copyright © 2020 Eclipse Foundation. All rights reserved.