Takes the output of straighten()
and turns the parsed cURL command lines
into working httr
VERB()
functions, optionally cat
'ing the text of each function
to the console and/or replacing the system clipboard with the source code for the function.
make_req(x, use_parts = FALSE, quiet = TRUE, add_clip = (length(x) == 1))
x | a vector of |
---|---|
use_parts | logical. If |
quiet | if |
add_clip | if |
a list
of working R function
s.
Evaluating Network Performance, Network Monitor
straighten()
, httr
VERB()
if (FALSE) { library(httr) my_ip <- straighten("curl 'https://httpbin.org/ip'") %>% make_req() # external test which captures live data content(my_ip[[1]](), as="parsed") } curl_line <- readLines(system.file("extdata/curl8.txt", package="curlconverter"), warn=FALSE) st <- straighten(curl_line, quiet=FALSE) req <- make_req(st)