get<T> method

Future<T> get<T>(
  1. String path, {
  2. Map<String, dynamic>? queryParameters,
  3. Options? options,
})

Perform a GET request

Implementation

Future<T> get<T>(
  String path, {
  Map<String, dynamic>? queryParameters,
  Options? options,
}) async {
  try {
    final response = await _dio.get<T>(
      path,
      queryParameters: queryParameters,
      options: options,
    );
    return response.data!;
  } on DioException catch (e) {
    if (e.error is ProdobitException) {
      throw e.error! as ProdobitException;
    }
    rethrow;
  }
}