DVHttpHostConfig class

A declared host: the unit credentials, timeout, retries, breaker and pool hang off.

Per host because "the payment gateway is slow" and "the geocoder is slow" call for different answers, and a global setting gives them the same one.

Constructors

DVHttpHostConfig({required String baseUrl, String? bearerSecret, Map<String, String> headers = const <String, String>{}, Duration timeout = const Duration(seconds: 30), DVHttpRetryPolicy retries = const DVHttpRetryPolicy(), DVHttpBreakerPolicy? breaker, int? maxConcurrent})
const
DVHttpHostConfig.fromConfig(String name, Map<String, Object?> map)
Reads one entry of the dartvel.http.hosts block.
factory

Properties

baseUrl → String
final
bearerSecret → String?
The name of a secret sent as Authorization: Bearer <value>.
final
breaker → DVHttpBreakerPolicy?
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
final
maxConcurrent → int?
Requests allowed in flight at once; null for no limit.
final
retries → DVHttpRetryPolicy
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeout → Duration
final

Methods

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