/webdav-request

Primary LanguageRustMIT LicenseMIT

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::Result<()> {
    let client = WebDAVClient::new(WEBDAV_URL, USERNAME, PASSWORD);
    let response = client.get("/path/file").await?;
    if response.status().is_success() {
        let _bytes = response.bytes().await?;
        // TODO
    }
    Ok(())
}