public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-backup 1/2] client/http_client: add put method
Date: Fri, 13 Nov 2020 10:38:48 +0100	[thread overview]
Message-ID: <20201113093852.28788-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20201113093852.28788-1-d.csapak@proxmox.com>

Signed-off-by: Dominik Csapak <d.csapak@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





  reply	other threads:[~2020-11-13  9:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13  9:38 [pve-devel] [PATCH proxmox-backup/pve-storage/manager] show/edit backup comments Dominik Csapak
2020-11-13  9:38 ` Dominik Csapak [this message]
2020-11-16 16:01   ` [pve-devel] applied: [pbs-devel] [PATCH proxmox-backup 1/2] client/http_client: add put method Thomas Lamprecht
2020-11-13  9:38 ` [pve-devel] [PATCH proxmox-backup 2/2] client: add 'snapshot notes show/update' command Dominik Csapak
2020-11-16  9:37   ` Thomas Lamprecht
2020-11-16  9:42     ` Dominik Csapak
2020-11-16 10:14       ` Thomas Lamprecht
2020-11-13  9:38 ` [pve-devel] [PATCH storage 1/2] api2/storage/content: change to volume_size_info and add return properties Dominik Csapak
2020-11-13  9:38 ` [pve-devel] [PATCH storage 2/2] Storage/Plugin: add get/update_volume_comment and implement for dir/pbs Dominik Csapak
2020-11-13  9:38 ` [pve-devel] [PATCH manager 1/1] ui: add ability to show and edit comments for backups Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201113093852.28788-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal