client/http_client: add put method
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
58fcbf5ab7
commit
3c945d73c2
|
@ -534,6 +534,15 @@ impl HttpClient {
|
||||||
self.request(req).await
|
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(
|
pub async fn download(
|
||||||
&mut self,
|
&mut self,
|
||||||
path: &str,
|
path: &str,
|
||||||
|
|
Loading…
Reference in New Issue