Browse Source

refactor(nextcloud): Remove safe option for mkcol

pull/520/head
jld3103 2 years ago
parent
commit
552a0ca0b9
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 16
      packages/nextcloud/lib/src/webdav/client.dart

16
packages/nextcloud/lib/src/webdav/client.dart

@ -116,23 +116,11 @@ class WebDavClient {
/// Creates a collection at [path]. /// Creates a collection at [path].
/// ///
/// See http://www.webdav.org/specs/rfc2518.html#METHOD_MKCOL for more information. /// See http://www.webdav.org/specs/rfc2518.html#METHOD_MKCOL for more information.
Future<HttpClientResponse> mkcol( Future<HttpClientResponse> mkcol(final String path) async => _send(
final String path, {
final bool safe = true,
}) async {
final expectedCodes = [
201,
if (safe) ...[
301,
405,
],
];
return _send(
'MKCOL', 'MKCOL',
_constructPath(path), _constructPath(path),
expectedCodes, [201],
); );
}
/// Deletes the resource at [path]. /// Deletes the resource at [path].
/// ///

Loading…
Cancel
Save