X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f2a79e0cc9bffcbe941d9a05b78f102fa6f09d03..7ff006ea5351259abe8edc89520996513652c147:/sdk/R/R/HttpParser.R diff --git a/sdk/R/R/HttpParser.R b/sdk/R/R/HttpParser.R index fb895bed34..d54207ea6f 100644 --- a/sdk/R/R/HttpParser.R +++ b/sdk/R/R/HttpParser.R @@ -1,35 +1,24 @@ #' HttpParser #' -HttpParser <- setRefClass( +HttpParser <- R6::R6Class( "HttrParser", - fields = list( - ), - - methods = list( + public = list( initialize = function() { }, - parseCollectionGet = function(serverResponse) - { - parsed_response <- httr::content(serverResponse, as = "parsed", type = "application/json") - - #Todo(Fudo): Create new Collection object and populate it - }, - parseJSONResponse = function(serverResponse) { parsed_response <- httr::content(serverResponse, as = "parsed", type = "application/json") - - #Todo(Fudo): Create new Collection object and populate it }, + #Todo(Fudo): Test this. parseWebDAVResponse = function(response, uri) { - #Todo(Fudo): Move this to HttpParser. text <- rawToChar(response$content) + print(text) doc <- XML::xmlParse(text, asText=TRUE) # calculate relative paths @@ -40,9 +29,8 @@ HttpParser <- setRefClass( }) ) result <- result[result != ""] - #Todo(Fudo): Test this. + result[-1] } - ) )