patch<T> method
Sends an HTTP PATCH request to path with optional body and decodes the JSON response as T.
Example:
final patched = await client.patch<Map<String, dynamic>>('/api/users/1', body: {'role': 'admin'});
Implementation
Future<T> patch<T>(
String path, {
dynamic body,
Map<String, String>? headers,
Map<String, dynamic>? queryParameters,
}) async {
final res = await _send('PATCH', path, body: body, headers: headers, queryParameters: queryParameters);
return res as T;
}