configureHttpClient method
HttpClientBuilder
configureHttpClient(
- void configure(
- BaseClient client,
- 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;
}