postx<T> method
Implementation
Future<dio_instance.Response> postx<T>(String path,
{Options? queryParams, Object? body}) async {
try {
Map<String, String> headers = await CommonHelper()
.getHearder(headerParams, baseOptions, queryParams);
headers = Map.from(headers)..addAll(headerDefault);
// var response = await post(Uri.parse(path), headers: headers, body: body);
dio_instance.Response response;
response = await dio.post(path,
options: dio_instance.Options(headers: headers), data: body);
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;
}
}