GpHttpConfig constructor
const
GpHttpConfig({
- required String baseUrl,
- Duration connectTimeout = const Duration(milliseconds: 10000),
- Duration receiveTimeout = const Duration(milliseconds: 15000),
- Map<
String, dynamic> headers = const {"Content-Type" : "application/json"}, - List<
Interceptor> interceptors = const [], - Future<
String?> tokenProvider()?, - Future<
String?> refreshToken()?, - GpRetryOptions? retryOptions,
- bool enableErrorInterceptor = true,
- GpErrorMapper? errorMapper,
- 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},
});