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

#52 in HTTP client

Download history 681/week @ 2024-07-30 764/week @ 2024-08-06 438/week @ 2024-08-13 465/week @ 2024-08-20 1350/week @ 2024-08-27 1735/week @ 2024-09-03 1840/week @ 2024-09-10 1352/week @ 2024-09-17 1236/week @ 2024-09-24 1358/week @ 2024-10-01 1059/week @ 2024-10-08 1466/week @ 2024-10-15 1696/week @ 2024-10-22 1298/week @ 2024-10-29 540/week @ 2024-11-05 1100/week @ 2024-11-12

4,817 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
~267K SLoC