put method
Makes a PUT request to the specified endpoint
Implementation
Future<Map<String, dynamic>> put(
String endpoint, {
Map<String, String>? headers,
Map<String, dynamic>? body,
}) async {
final uri = _buildUri(endpoint);
final request = http.Request('PUT', uri);
request.headers.addAll({'Content-Type': 'application/json'});
if (headers != null) {
request.headers.addAll(headers);
}
if (body != null) {
request.body = jsonEncode(body);
}
return _executeRequest(request);
}