powered by
If a URL is redirected, query the new location via curlGetHeaders(), otherwise return the original URL.
curlGetHeaders()
url_destination(x, force = FALSE)
The final destination(s). If the URL returns a status code greater than or equal to 400, it will throw an error.
A character vector of URLs.
By default, the query is cached in the current R session. To bypass the cache, use force = TRUE.
force = TRUE
u = "https://cran.r-project.org/package=xfun" url_destination(u) # redirected to canonical URL
Run the code above in your browser using DataLab