put static method
PUT 请求
Implementation
static Future<http.Response> put(
String url, {
Map<String, String>? headers,
Object? body,
Duration timeout = const Duration(seconds: 30),
}) async {
_logRequest('PUT', url, headers: headers, body: body);
try {
final response = await http
.put(Uri.parse(url), headers: headers, body: body)
.timeout(timeout);
_logResponse('PUT', url, response);
return response;
} catch (e) {
_logError('PUT', url, e);
rethrow;
}
}