]> git.proxmox.com Git - proxmox-backup.git/commitdiff
src/client/http_client.rs: cleanup (rename parameter)
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 20 Sep 2019 09:57:03 +0000 (11:57 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 20 Sep 2019 09:57:03 +0000 (11:57 +0200)
src/client/http_client.rs

index e524dcfa03748a51d9d6340be23136c945ae4de6..730f55d3fab7892c38c76a480f22e74baa5ceffb 100644 (file)
@@ -1213,11 +1213,11 @@ impl H2Client {
     }
 
     // Note: We always encode parameters with the url
-    pub fn request_builder(server: &str, method: &str, path: &str, data: Option<Value>) -> Result<Request<()>, Error> {
+    pub fn request_builder(server: &str, method: &str, path: &str, param: Option<Value>) -> Result<Request<()>, Error> {
         let path = path.trim_matches('/');
 
-        if let Some(data) = data {
-            let query = tools::json_object_to_query(data)?;
+        if let Some(param) = param {
+            let query = tools::json_object_to_query(param)?;
             // We detected problem with hyper around 6000 characters - seo we try to keep on the safe side
             if query.len() > 4096 { bail!("h2 query data too large ({} bytes) - please encode data inside body", query.len()); }
             let url: Uri = format!("https://{}:8007/{}?{}", server, path, query).parse()?;