11 releases

0.1.11 Apr 27, 2024
0.1.9 Jan 31, 2024
0.1.5 Dec 1, 2023
0.1.4 Sep 12, 2023
0.1.1 Sep 9, 2022

#82 in HTTP client

Download history 711/week @ 2024-01-23 566/week @ 2024-01-30 448/week @ 2024-02-06 751/week @ 2024-02-13 1290/week @ 2024-02-20 660/week @ 2024-02-27 897/week @ 2024-03-05 1299/week @ 2024-03-12 568/week @ 2024-03-19 189/week @ 2024-03-26 945/week @ 2024-04-02 901/week @ 2024-04-09 1002/week @ 2024-04-16 992/week @ 2024-04-23 812/week @ 2024-04-30 839/week @ 2024-05-07

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

MIT/Apache

39KB
869 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
~306K SLoC