[pbs-devel] [PATCH proxmox-backup 1/2] client/http_client: add put method

Dominik Csapak d.csapak at proxmox.com
Fri Nov 13 10:38:48 CET 2020


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/client/http_client.rs | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/client/http_client.rs b/src/client/http_client.rs
index e3f9f323..a9b9c06c 100644
--- a/src/client/http_client.rs
+++ b/src/client/http_client.rs
@@ -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,
-- 
2.20.1






More information about the pbs-devel mailing list