curl

webdav

#创建目录
curl -X MKCOL 'https://example.com/webdav/'
#上传文件
curl -T '/tmp/file.txt' 'https://example.com/webdav/'
#重命名
curl -X MOVE --header 'Destination:http://example.org/webdav/new.txt' 'https://example.com/webdav/file.txt'
#删除文件并打印状态码
curl -X DELETE 'https://example.com/webdav/test/test.txt' -sw '%{http_code}'
#删除文件夹
curl -X DELETE 'https://example.com/webdav/test/'
#自动判断认证模式
curl --user 'user:pass' 'https://example.com' --anyauth
#使用basic认证模式
curl --user 'user:pass' 'https://example.com' --basic
#使用digest认证模式
curl --user 'user:pass' 'https://example.com' --digest

https://www.qed42.com/blog/using-curl-commands-webdav

你可能感兴趣的:(curl)