webdav-request

Crates.iowebdav-request
lib.rswebdav-request
version0.3.0
sourcesrc
created_at2024-08-04 12:05:03.113021
updated_at2024-10-30 09:57:34.83399
descriptiona lightweight webdav client library
homepage
repositoryhttps://github.com/cradiy/webdav-request.git
max_upload_size
id1324926
size28,261
Cradiy (cradiy)

documentation

README

Crate Info

wevdav-request

webdav-request a lightweight webdav client library, based on reqwest.

WARNING

This is a library under development and is not stable.

Getting Started

use webdav_request::WebDAVClient;

const WEBDAV_URL: &str = "https://your.webdav.com";
const USERNAME: &str = "name";
const PASSWORD: &str = "password";

#[tokio::main]
async fn main() -> webdav_request::error::Result<()> {
    let client = WebDAVClient::new(USERNAME, PASSWORD)?;
    let response = client.get(format!("{}/path/file", WEBDAV_URL)).await?;
    if response.status().is_success() {
        let _bytes = response.bytes().await?;
        // TODO
    }
    Ok(())
}


Commit count: 23

cargo fmt