6 releases

new 0.1.5 Dec 1, 2023
0.1.4 Sep 12, 2023
0.1.3 May 26, 2023
0.1.1 Sep 9, 2022

#139 in Authentication

Download history 335/week @ 2023-08-10 366/week @ 2023-08-17 142/week @ 2023-08-24 451/week @ 2023-08-31 661/week @ 2023-09-07 329/week @ 2023-09-14 481/week @ 2023-09-21 319/week @ 2023-09-28 599/week @ 2023-10-05 1094/week @ 2023-10-12 629/week @ 2023-10-19 744/week @ 2023-10-26 500/week @ 2023-11-02 655/week @ 2023-11-09 695/week @ 2023-11-16 707/week @ 2023-11-23

2,832 downloads per month

MIT license

28KB
680 lines

Reqwest dav

An async webdav client for rust with tokio and reqwest

Features

  • Authentication
    • Basic
    • Digest
  • Files management
    • Get
    • Put
    • Mv
    • Delete
    • Mkcol
    • List

Examples

use crate::{Auth, ClientBuilder, Depth, Error};

#[tokio::test]
async fn it_works() -> Result<(), Error> {
  
    // build a client
    let client = ClientBuilder::new()
        .set_host("http://server/remote.php/dav/files/username/".to_string())
        .set_auth(Auth::Basic("username".to_owned(), "password".to_owned()))
        .build()?;

    // list files
    println!(
        "{}",
        serde_json::to_string(&client.list("", Depth::Infinity).await?).unwrap()
    );
  
    // delete a file
    client.delete("1.txt").await.unwrap();

    Ok(())
}

Dependencies

~8–20MB
~315K SLoC