powered by
http_was_redirected
http_was_redirected(r)
list with slots was_redirected, redirected_from and redirected_to
was_redirected
redirected_from
redirected_to
an httr response object, e.g. from a call to httr::GET()
Function in large parts taken from https://petermeissner.de/blog/2018/11/07/using-httr-to-detect-redirects/.
if (FALSE) { r <- httr::GET("http://httpbin.org/redirect/2") pxweb:::http_was_redirected(r) }
Run the code above in your browser using DataLab