13次发布

0.1.13 2024年7月31日
0.1.12 2024年7月10日
0.1.11 2024年4月27日
0.1.9 2024年1月31日
0.1.1 2022年9月9日

#72HTTP客户端

Download history • Rust 包仓库 798/week @ 2024-04-28 • Rust 包仓库 961/week @ 2024-05-05 • Rust 包仓库 1059/week @ 2024-05-12 • Rust 包仓库 1222/week @ 2024-05-19 • Rust 包仓库 981/week @ 2024-05-26 • Rust 包仓库 1110/week @ 2024-06-02 • Rust 包仓库 1139/week @ 2024-06-09 • Rust 包仓库 829/week @ 2024-06-16 • Rust 包仓库 1197/week @ 2024-06-23 • Rust 包仓库 684/week @ 2024-06-30 • Rust 包仓库 801/week @ 2024-07-07 • Rust 包仓库 879/week @ 2024-07-14 • Rust 包仓库 890/week @ 2024-07-21 • Rust 包仓库 870/week @ 2024-07-28 • Rust 包仓库 681/week @ 2024-08-04 • Rust 包仓库 553/week @ 2024-08-11 • Rust 包仓库

3,087 每月下载量
用于 opentalk-nextcloud-client

MIT/Apache

49KB
1K SLoC

Reqwest dav

crates.io Documentation MIT/Apache-2 licensed CI

使用tokio和reqwest的Rust异步webdav客户端

特性

  • 身份验证
    • 基本
    • 摘要
  • 文件管理
    • 获取
    • 放置
    • 移动
    • 删除
    • 创建集合
    • 列表

示例

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(())
}

依赖

~8–21MB
~318K SLoC