GpHttpConfig class

Constructors

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}})
const

Properties

baseUrl String
final
connectTimeout Duration
final
enableErrorInterceptor bool
final
errorMapper GpErrorMapper?
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>
final
interceptors List<Interceptor>
final
receiveTimeout Duration
final
refreshStatusCodes Set<int>
final
refreshToken Future<String?> Function()?
final
retryOptions GpRetryOptions?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tokenProvider Future<String?> Function()?
final

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