configureHttpClient method

HttpClientBuilder configureHttpClient(
  1. void configure(
    1. BaseClient client,
    2. ServiceProvider services
    )
)

Adds an action to configure the outgoing client instance.

Implementation

HttpClientBuilder configureHttpClient(
  void Function(http.BaseClient client, ServiceProvider services) configure,
) {
  services.configure<HttpClientFactoryOptions>(
    HttpClientFactoryOptions.new,
    (options) => options.httpClientActions.add(configure),
    name: name,
  );
  return this;
}