Struct reqwest_dav::Client
source · pub struct Client {
pub agent: Client,
pub host: String,
pub auth: Auth,
pub digest_auth: Arc<Mutex<Option<WwwAuthenticateHeader>>>,
}
Fields§
§agent: Client
§host: String
§auth: Auth
§digest_auth: Arc<Mutex<Option<WwwAuthenticateHeader>>>
Implementations§
source§impl Client
impl Client
sourcepub async fn start_request(
&self,
method: Method,
path: &str
) -> Result<RequestBuilder, Error>
pub async fn start_request( &self, method: Method, path: &str ) -> Result<RequestBuilder, Error>
Main function that creates the RequestBuilder, sets the method, url and the basic_auth
pub async fn get_raw(&self, path: &str) -> Result<Response, Error>
sourcepub async fn get(&self, path: &str) -> Result<Response, Error>
pub async fn get(&self, path: &str) -> Result<Response, Error>
Get a file from Webdav server
Use absolute path to the webdav server file location
pub async fn put_raw<B: Into<Body>>( &self, path: &str, body: B ) -> Result<Response, Error>
sourcepub async fn put<B: Into<Body>>(&self, path: &str, body: B) -> Result<(), Error>
pub async fn put<B: Into<Body>>(&self, path: &str, body: B) -> Result<(), Error>
Upload a file/zip on Webdav server
It can be any type of file as long as it is transformed to a vector of bytes (Vec
Use absolute path to the webdav server folder location
pub async fn delete_raw(&self, path: &str) -> Result<Response, Error>
sourcepub async fn delete(&self, path: &str) -> Result<(), Error>
pub async fn delete(&self, path: &str) -> Result<(), Error>
Deletes the collection, file, folder or zip archive at the given path on Webdav server
Use absolute path to the webdav server file location
pub async fn mkcol_raw(&self, path: &str) -> Result<Response, Error>
sourcepub async fn mkcol(&self, path: &str) -> Result<(), Error>
pub async fn mkcol(&self, path: &str) -> Result<(), Error>
Creates a directory on Webdav server
Use absolute path to the webdav server file location
pub async fn unzip_raw(&self, path: &str) -> Result<Response, Error>
sourcepub async fn unzip(&self, path: &str) -> Result<(), Error>
pub async fn unzip(&self, path: &str) -> Result<(), Error>
Unzips the .zip archieve on Webdav server
Use absolute path to the webdav server file location
pub async fn mv_raw(&self, from: &str, to: &str) -> Result<Response, Error>
sourcepub async fn mv(&self, from: &str, to: &str) -> Result<(), Error>
pub async fn mv(&self, from: &str, to: &str) -> Result<(), Error>
Rename or move a collection, file, folder on Webdav server
If the file location changes it will move the file, if only the file name changes it will rename it.
Use absolute path to the webdav server file location
pub async fn list_raw( &self, path: &str, depth: Depth ) -> Result<Response, Error>
pub async fn list_rsp( &self, path: &str, depth: Depth ) -> Result<Vec<ListResponse>, Error>
sourcepub async fn list(
&self,
path: &str,
depth: Depth
) -> Result<Vec<ListEntity>, Error>
pub async fn list( &self, path: &str, depth: Depth ) -> Result<Vec<ListEntity>, Error>
List files and folders at the given path on Webdav server
Depth of “0” applies only to the resource, “1” to the resource and it’s children, “infinity” to the resource and all it’s children recursively The result will contain an xml list with the remote folder contents.
Use absolute path to the webdav server folder location