10 releases

0.1.9 Jan 31, 2024
0.1.8 Jan 8, 2024
0.1.5 Dec 1, 2023
0.1.4 Sep 12, 2023
0.1.1 Sep 9, 2022

#84 in HTTP client

Download history 564/week @ 2023-12-22 672/week @ 2023-12-29 1433/week @ 2024-01-05 1787/week @ 2024-01-12 907/week @ 2024-01-19 692/week @ 2024-01-26 485/week @ 2024-02-02 708/week @ 2024-02-09 879/week @ 2024-02-16 904/week @ 2024-02-23 982/week @ 2024-03-01 1280/week @ 2024-03-08 762/week @ 2024-03-15 311/week @ 2024-03-22 732/week @ 2024-03-29 691/week @ 2024-04-05

2,778 downloads per month
Used in opentalk-nextcloud-client

MIT/Apache

36KB
797 lines

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
    • 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–22MB
~319K SLoC