HTTPRetry class

Describes the retry policy to use when a HTTP request fails.

Constructors

HTTPRetry({required int attempts, Duration? perTryTimeout, String? retryOn, bool? retryRemoteLocalities})
The main constructor.
const
HTTPRetry.fromJson(Map<String, dynamic> json)
Creates a HTTPRetry from JSON data.

Properties

attempts int
Number of retries to be allowed for a given request. The interval between retries will be determined automatically (25ms+). When request timeout of the HTTP route or per_try_timeout is configured, the actual number of retries attempted also depends on the specified request timeout and per_try_timeout values.
final
hashCode int
The hash code for this object.
no setterinherited
perTryTimeout Duration?
Timeout per attempt for a given request, including the initial call and any retries. Format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is same value as request timeout of the HTTP route, which means no timeout.
final
retryOn String?
Specifies the conditions under which retry takes place. One or more policies can be specified using a ‘,’ delimited list. See the retry policies and gRPC retry policies for more details.
final
retryRemoteLocalities bool?
Flag to specify whether the retries should retry to other localities. See the retry plugin configuration for more details.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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