patch<T> method
Implementation
@override
Future<HttpResponse<T>> patch<T>({
required Uri apiUri,
Map<String, String>? headers,
Map<String, dynamic>? body,
}) async {
debugPrint('----HttpService: PATCH API call-----');
try {
final response = await _dio.patch<T>(
apiUri.toString(),
data: body,
options: Options(
headers: headers ?? {'content-type': 'application/json'},
),
);
return _toHttpResponse(dioResponse: response);
} on DioException catch (e) {
debugPrint('----HttpService: PATCH Error: $apiUri ${e.message}-----');
return _buildErrorResponse<T>(e, apiUri.toString());
}
}