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