Last active
July 29, 2021 06:36
-
-
Save xquery/7643288 to your computer and use it in GitHub Desktop.
webdav the api you never knew existed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add file | |
curl -X PUT --anyauth --user 'admin:admin' -T cluster1.xml 'http://localhost:8005/testfile.xml' | |
make directory | |
curl -X MKCOL --anyauth --user 'admin:admin' 'http://localhost:8005/testdir' | |
move a file | |
curl -X MOVE --anyauth --user 'admin:admin' --header 'Destination: http://localhost:8005/testfile1.xml' 'http://localhost:8005/testfile.xml' | |
list all files in webdav | |
curl --anyauth --user 'admin:admin' -i -X PROPFIND http://localhost:8005/ --upload-file - -H "Depth: 100" <<end | |
<?xml version="1.0"?> | |
<a:propfind xmlns:a="DAV:"> | |
<a:prop><a:resourcetype/></a:prop> | |
</a:propfind> | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment