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.

@FunctionalInterface public interface ClientHttpRequestInitializer
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:
  - `HttpAccessor.getClientHttpRequestInitializers()`

## Method Summary

Modifier and Type
Method
Description
`void`
`initialize(ClientHttpRequest request)`
Initialize the given client HTTP request.

## Method Details

### initialize

void initialize(ClientHttpRequest request)
Initialize the given client HTTP request.

Parameters:
  `request` - the request to configure