GpRetryOptions constructor
const
GpRetryOptions({
- int maxRetries = 2,
- Duration retryDelay = const Duration(milliseconds: 400),
- bool exponentialBackoff = true,
- Set<
int> retryStatusCodes = const {408, 429, 500, 502, 503, 504}, - Set<
DioExceptionType> retryOn = const {DioExceptionType.connectionTimeout, DioExceptionType.receiveTimeout, DioExceptionType.sendTimeout, DioExceptionType.connectionError}, - Set<
String> retryMethods = const {'GET', 'HEAD', 'OPTIONS'},
Implementation
const GpRetryOptions({
this.maxRetries = 2,
this.retryDelay = const Duration(milliseconds: 400),
this.exponentialBackoff = true,
this.retryStatusCodes = const {408, 429, 500, 502, 503, 504},
this.retryOn = const {
DioExceptionType.connectionTimeout,
DioExceptionType.receiveTimeout,
DioExceptionType.sendTimeout,
DioExceptionType.connectionError,
},
this.retryMethods = const {'GET', 'HEAD', 'OPTIONS'},
});