client/http_client: add put method

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak authored and Thomas Lamprecht committed 2020-11-16 16:59:14 +01:00
1 parent 58fcbf5ab7
commit 3c945d73c2
1 file changed
+9
+9
View File
@@ -534,6 +534,15 @@ impl HttpClient {
self.request(req).await
}
pub async fn put(
&mut self,
path: &str,
data: Option<Value>,
) -> Result<Value, Error> {
let req = Self::request_builder(&self.server, self.port, "PUT", path, data)?;
self.request(req).await
}
pub async fn download(
&mut self,
path: &str,