Use rhttp to make webdav requests.

This commit is contained in:
2025-03-05 21:47:28 +08:00
parent 0ca8a28639
commit fffb3dc973
4 changed files with 12 additions and 34 deletions

View File

@@ -257,18 +257,7 @@ class RHttpAdapter implements HttpClientAdapter {
Future<void>? cancelFuture,
) async {
var res = await rhttp.Rhttp.request(
method: switch (options.method) {
'GET' => rhttp.HttpMethod.get,
'POST' => rhttp.HttpMethod.post,
'PUT' => rhttp.HttpMethod.put,
'PATCH' => rhttp.HttpMethod.patch,
'DELETE' => rhttp.HttpMethod.delete,
'HEAD' => rhttp.HttpMethod.head,
'OPTIONS' => rhttp.HttpMethod.options,
'TRACE' => rhttp.HttpMethod.trace,
'CONNECT' => rhttp.HttpMethod.connect,
_ => throw ArgumentError('Unsupported method: ${options.method}'),
},
method: rhttp.HttpMethod(options.method),
url: options.uri.toString(),
settings: settings,
expectBody: rhttp.HttpExpectBody.stream,