get<T> method
Method to perform GET request
Implementation
@override
Future<T> get<T>() async {
try {
ApiRequest apiRequest = ApiRequest(
_stringifyQuery(),
method: ApiMethod.GET,
);
Response response = await apiRequest.send();
return response.data as T;
} on DioException catch (e) {
throw PocketBaseException(
errorCode: e.response?.statusCode,
message: e.message,
response: e.response?.data,
);
} catch (e) {
rethrow;
}
}