GpHttpConfig constructor

const GpHttpConfig({
  1. required String baseUrl,
  2. Duration connectTimeout = const Duration(milliseconds: 10000),
  3. Duration receiveTimeout = const Duration(milliseconds: 15000),
  4. Map<String, dynamic> headers = const {"Content-Type" : "application/json"},
  5. List<Interceptor> interceptors = const [],
  6. Future<String?> tokenProvider()?,
  7. Future<String?> refreshToken()?,
  8. GpRetryOptions? retryOptions,
  9. bool enableErrorInterceptor = true,
  10. GpErrorMapper? errorMapper,
  11. Set<int> refreshStatusCodes = const {401},
})

Implementation

const GpHttpConfig({
  required this.baseUrl,
  this.connectTimeout = const Duration(milliseconds: 10000),
  this.receiveTimeout = const Duration(milliseconds: 15000),
  this.headers = const {"Content-Type": "application/json"},
  this.interceptors = const [],
  this.tokenProvider,
  this.refreshToken,
  this.retryOptions,
  this.enableErrorInterceptor = true,
  this.errorMapper,
  this.refreshStatusCodes = const {401},
});