patchx<T> method
Implementation
Future<Response> patchx<T>(String path,
{Options? queryParams, Object? body}) async {
try {
Map<String, String> headers =
CommonHelper().getHearder(headerParams, baseOptions, queryParams);
headers = Map.from(headers)..addAll(headerDefault);
var response = await patch(Uri.parse(path), headers: headers, body: body);
if (response.reasonPhrase != 'OK') throw response.body;
return Future.value(response);
} on FormatException catch (_) {
throw const FormatException("Unable to process the data");
} catch (e) {
throw e.toString();
}
}