View source: R/pxweb_add_config.R
http_was_redirected | R Documentation |
http_was_redirected
http_was_redirected(r)
r |
an httr response object, e.g. from a call to httr::GET() |
list with slots was_redirected
, redirected_from
and redirected_to
Function in large parts taken from https://petermeissner.de/blog/2018/11/07/using-httr-to-detect-redirects/.
## Not run:
r <- httr::GET("http://httpbin.org/redirect/2")
pxweb:::http_was_redirected(r)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.