httpbin <- request(example_url())
# You can supply template parameters in `...`
httpbin |> req_template("GET /bytes/{n}", n = 100)
# or you retrieve from the current environment
n <- 200
httpbin |> req_template("GET /bytes/{n}")
# Existing path is preserved:
httpbin_test <- request(example_url()) |> req_url_path("/test")
name <- "id"
value <- "a3fWa"
httpbin_test |> req_template("GET /set/{name}/{value}")
Run the code above in your browser using DataLab