getResponse abstract method
Future<Either<Response, FailureState> >
getResponse({
- required String endPoint,
- required ApiMethods apiMethods,
- void unAuthorizedCallBack()?,
- Map<
String, dynamic> ? queryParams, - dynamic body,
- Options? options,
- CacheConfig cacheConfig = const CacheConfig(),
- RetryConfig retryConfig = const RetryConfig(),
- bool hasInternet = true,
Executes an HTTP request and returns Either:
Lefton success (HTTP 200/201 or cache hit)Righton failure with a FailureState
unAuthorizedCallBack is optional. When null, the global callback
registered via NetworkService.configureNetworkService is used instead.
Implementation
Future<Either<Response<dynamic>, FailureState>> getResponse({
required String endPoint,
required ApiMethods apiMethods,
void Function()? unAuthorizedCallBack,
Map<String, dynamic>? queryParams,
dynamic body,
Options? options,
CacheConfig cacheConfig = const CacheConfig(),
RetryConfig retryConfig = const RetryConfig(),
bool hasInternet = true,
});