HttpClientFactory class abstract

A factory abstraction for a component that can create http.BaseClient instances with custom configuration for a given logical name.

A default HttpClientFactory can be registered by calling HttpClientFactoryServiceCollectionExtensions.addHttpClient. The default factory is registered in the service collection as a singleton.

Constructors

HttpClientFactory()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createClient([String? name = Options.defaultName]) → BaseClient
Creates and configures a http.BaseClient instance using the configuration that corresponds to the logical name specified by name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited