GpRetryOptions constructor

const GpRetryOptions({
  1. int maxRetries = 2,
  2. Duration retryDelay = const Duration(milliseconds: 400),
  3. bool exponentialBackoff = true,
  4. Set<int> retryStatusCodes = const {408, 429, 500, 502, 503, 504},
  5. Set<DioExceptionType> retryOn = const {DioExceptionType.connectionTimeout, DioExceptionType.receiveTimeout, DioExceptionType.sendTimeout, DioExceptionType.connectionError},
  6. 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'},
});