16 releases

0.2.1 Apr 21, 2025
0.1.15 Mar 21, 2025
0.1.14 Oct 28, 2024
0.1.13 Jul 31, 2024
0.1.1 Sep 9, 2022

#64 in HTTP client

Download history 525/week @ 2025-01-29 1972/week @ 2025-02-05 884/week @ 2025-02-12 1114/week @ 2025-02-19 1482/week @ 2025-02-26 1674/week @ 2025-03-05 3098/week @ 2025-03-12 2185/week @ 2025-03-19 2930/week @ 2025-03-26 2629/week @ 2025-04-02 3114/week @ 2025-04-09 2448/week @ 2025-04-16 3111/week @ 2025-04-23 2701/week @ 2025-04-30 2943/week @ 2025-05-07 2458/week @ 2025-05-14

11,590 downloads per month
Used in 6 crates (3 directly)

MIT/Apache

55KB
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

~9–21MB
~284K SLoC