Package org.springframework.http.client
Interface ClientHttpRequestInitializer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback interface for initializing a
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.
- Since:
- 5.2
- Author:
- Phillip Webb
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(ClientHttpRequest request) Initialize the given client HTTP request.
-
Method Details
-
initialize
Initialize the given client HTTP request.- Parameters:
request- the request to configure
-