get method

Future<Response> get(
  1. String path, {
  2. APIType apiType = APIType.public,
  3. Map<String, dynamic>? query,
  4. Map<String, dynamic>? headers,
  5. bool shouldCache = false,
})

Implementation

Future<Response<dynamic>> get(
  String path, {
  APIType apiType = APIType.public,
  Map<String, dynamic>? query,
  Map<String, dynamic>? headers,
  bool shouldCache = false,
}) async {
  _setDioInterceptorList(shouldCache: shouldCache);

  final standardHeaders = await _getOptions(apiType);

  return _dio
      .get(path, queryParameters: query, options: standardHeaders)
      .then((value) => value)
      .catchError(_handleException);
}