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

#81 in HTTP client

Download history 758/week @ 2024-01-25 422/week @ 2024-02-01 671/week @ 2024-02-08 765/week @ 2024-02-15 1080/week @ 2024-02-22 801/week @ 2024-02-29 1252/week @ 2024-03-07 942/week @ 2024-03-14 386/week @ 2024-03-21 481/week @ 2024-03-28 758/week @ 2024-04-04 968/week @ 2024-04-11 951/week @ 2024-04-18 914/week @ 2024-04-25 964/week @ 2024-05-02 873/week @ 2024-05-09

3,785 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–23MB
~310K SLoC