Skip to content

Commit fe7e6db

Browse files
Documented MOVE WebDAV method in README
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
1 parent 1f0a75b commit fe7e6db

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public class MyActivity extends AppCompatActivity {
235235

236236
#### 5.3) **WebDAV**
237237

238-
Currently the following `WebDAV` Methods are supported: `PROPFIND` / `MKCOL`
238+
Currently the following `WebDAV` Methods are supported: `PROPFIND`, `MKCOL`, `MOVE`.
239239

240240
The following examples shows how to use the `PROPFIND` method with a depth of 0.
241241

@@ -251,6 +251,18 @@ final var nextcloudRequest = new NextcloudRequest.Builder()
251251
.build();
252252
```
253253

254+
For the `MOVE` method, the `Destination` and `Overwrite` additional parameters must be specified:
255+
256+
```
257+
final var nextcloudRequest = new NextcloudRequest.Builder()
258+
.setMethod("MOVE")
259+
.setUrl(Uri.encode("/remote.php/webdav/" + remotePath, "/"))
260+
.setAdditionalParameter(NextcloudRequest.ADDITIONAL_PARAMETER_MOVE_DESTINATION, "/remote.php/webdav/" + destinationPath)
261+
.setAdditionalParameter(NextcloudRequest.ADDITIONAL_PARAMETER_MOVE_OVERWRITE, true)
262+
.build();
263+
```
264+
265+
254266
## Additional info
255267

256268
In case that you require some SSO features that were introduced in a specific Nextcloud Files app version, you can run a simple version check using the following helper method:

0 commit comments

Comments
 (0)