ApiRequest class
Properties
-
dio
→ Dio
-
no setter
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearCache(String endpoint, {Map<String, dynamic>? params})
→ void
-
Clears cached API responses for a specific endpoint
-
getNamedDio(String name)
→ Dio
-
-
getThirdPartyDio(String baseUrl, {})
→ Dio
-
Returns a new Dio instance for third-party API requests
-
initialize({required String baseUrl, List<Interceptor>? interceptors})
→ Future<void>
-
Initializes API Client
-
initializeMultipleClients({required Map<String, String> baseUrls, List<Interceptor>? interceptors})
→ Future<void>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
request({required String endpoint, required RequestMethod method, Map<String, dynamic>? params, Object? data, String? contentType, Duration? cacheDuration, bool forceRefresh = false, bool isThirdParty = false, String? thirdPartyBaseUrl, String clientName = 'consumer'})
→ Future
-
General API request handler
-
toString()
→ String
-
A string representation of this object.
inherited