get method

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

Implementation

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

  final standardHeaders = await _getOptions(apiType, tokenType);

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