Obtains the contents of one or more url's from the OpenCPU server response in a list.
Arguments
- resp
An object of class
httr::response()
, typically returned by a previous call tohttr::POST
to the server.- pattern
A character vector with the trailing part of the requested url, e.g.
"R/.val"
or"stdout"
. Use""
to obtain all results.
Value
A list with the contents under the url's that match
pattern
. The result has length 0 if the pattern was
not found.
Examples
if (FALSE) { # \dontrun{
fn <- system.file("testdata", "client3.json", package = "jamesclient")
resp <- upload_txt(fn)
resp
download_as_list(resp, pattern = "")
} # }