patch<T> method
Implementation
Future<Response<T>> patch<T>(
String url, {
dynamic body,
String? contentType,
Map<String, String>? headers,
Map<String, dynamic>? query,
Decoder<T>? decoder,
Progress? uploadProgress,
// List<MultipartFile> files,
}) async {
try {
var response = await _performRequest<T>(
() => _request<T>(
url,
'patch',
contentType: contentType,
body: body,
query: query,
decoder: decoder,
uploadProgress: uploadProgress,
),
headers: headers,
);
return response;
} on Exception catch (e) {
if (!errorSafety) {
throw GetHttpException(e.toString());
}
return Future.value(Response<T>(
statusText: 'Can not connect to server. Reason: $e',
));
}
}