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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `initialize(ClientHttpRequest request)` Initialize the given client HTTP request.

- - ### Method Detail

    - #### initialize

          void initialize(ClientHttpRequest request)

      Initialize the given client HTTP request.
      Parameters:
        `request` - the request to configure