14 releases

0.1.14 Oct 28, 2024
0.1.13 Jul 31, 2024
0.1.11 Apr 27, 2024
0.1.9 Jan 31, 2024
0.1.1 Sep 9, 2022

#58 in HTTP client

Download history 1120/week @ 2024-10-09 1452/week @ 2024-10-16 1759/week @ 2024-10-23 1119/week @ 2024-10-30 542/week @ 2024-11-06 1124/week @ 2024-11-13 1074/week @ 2024-11-20 1287/week @ 2024-11-27 796/week @ 2024-12-04 708/week @ 2024-12-11 486/week @ 2024-12-18 543/week @ 2024-12-25 926/week @ 2025-01-01 1073/week @ 2025-01-08 805/week @ 2025-01-15 676/week @ 2025-01-22

3,522 downloads per month
Used in opentalk-nextcloud-client

MIT/Apache

50KB
1K SLoC

Reqwest dav

crates.io Documentation MIT/Apache-2 licensed CI

An async webdav client for rust with tokio and reqwest

Features

  • Authentication
    • Basic
    • Digest
  • Files management
    • Get
    • Put
    • Mv
    • Cp
    • 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
~271K SLoC