getx<T> method
Implementation
Future<dio_instance.Response> getx<T>(String path,
{Options? queryParams}) async {
try {
Map<String, String> headers = await CommonHelper()
.getHearder(headerParams, baseOptions, queryParams);
headers = Map.from(headers)..addAll(headerDefault);
// var response = await get(
// Uri.parse(path),
// headers: headers,
// );
dio_instance.Response response;
response =
await dio.get(path, options: dio_instance.Options(headers: headers));
return Future.value(response);
} on FormatException catch (_) {
throw const FormatException("Unable to process the data");
} on dio_instance.DioError catch (e) {
throw e.response?.data;
}
}