put static method
Makes a PUT request to the specified url.
The url can be either a String or a Uri object.
Implementation
static Future<http.Response> put(
Object url, {
Map<String, String>? headers,
Object? body,
Encoding? encoding,
}) async {
try {
final uri = _toUri(url);
return _client.put(uri, headers: headers, body: body, encoding: encoding);
} catch (e) {
if (e is HTTPSException) {
rethrow;
} else {
Error.throwWithStackTrace(
HTTPSException(
message: 'Failed to make PUT request to $url: ${e.toString()}',
originalError: e,
),
StackTrace.current,
);
}
}
}