@FunctionalInterface public interface ClientHttpRequestInitializer
ClientHttpRequest
prior to it
being used.
Typically used with HttpAccessor
and subclasses such as
RestTemplate
to apply
consistent settings or headers to each request.
Unlike ClientHttpRequestInterceptor
, this interface can apply
customizations without needing to read the entire request body into memory.
HttpAccessor.getClientHttpRequestInitializers()
Modifier and Type | Method and Description |
---|---|
void |
initialize(ClientHttpRequest request)
Initialize the given client HTTP request.
|
void initialize(ClientHttpRequest request)
request
- the request to configure