req_url {httr2} | R Documentation |
req_url()
replaces the entire url
req_url_query()
modifies the components of the query
req_url_path()
modifies the path
req_url_path_append()
adds to the path
req_url(req, url)
req_url_query(.req, ...)
req_url_path(req, ...)
req_url_path_append(req, ...)
req, .req |
A request. |
url |
New URL; completely replaces existing. |
... |
For For |
A modified HTTP request.
req <- request("http://example.com")
# Change url components
req %>%
req_url_path_append("a") %>%
req_url_path_append("b") %>%
req_url_path_append("search.html") %>%
req_url_query(q = "the cool ice")
# Change complete url
req %>%
req_url("http://google.com")