Merge branch '21535-multi-wf-delete'
[arvados.git] / sdk / R / R / HttpRequest.R
index 4595fef662c1c9422af13dc0222a10bd9a9df48a..4540902d2e20d02dc52409bf475f311e0f2d8ae4 100644 (file)
@@ -2,8 +2,6 @@
 #
 # SPDX-License-Identifier: Apache-2.0
 
-source("./R/util.R")
-
 HttpRequest <- R6::R6Class(
 
     "HttrRequest",
@@ -16,7 +14,7 @@ HttpRequest <- R6::R6Class(
         initialize = function()
         {
             self$validContentTypes <- c("text", "raw")
-            self$validVerbs <- c("GET", "POST", "PUT", "DELETE", "PROPFIND", "MOVE")
+            self$validVerbs <- c("GET", "POST", "PUT", "DELETE", "PROPFIND", "MOVE", "COPY")
         },
 
         exec = function(verb, url, headers = NULL, body = NULL, queryParams = NULL,
@@ -32,7 +30,6 @@ HttpRequest <- R6::R6Class(
             if(toString(Sys.getenv("ARVADOS_API_HOST_INSECURE") == "TRUE"))
                config$options = list(ssl_verifypeer = 0L)
 
-            # times = 1 regular call + numberOfRetries
             response <- httr::RETRY(verb, url = url, body = body,
                                     config = config, times = retryTimes + 1)
         },
@@ -54,7 +51,7 @@ HttpRequest <- R6::R6Class(
             {
                 query <- paste0(names(query), "=", query, collapse = "&")
 
-                return(paste0("/?", query))
+                return(paste0("?", query))
             }
 
             return("")