http_was_redirected {pxweb} | R Documentation |
http_was_redirected
Description
http_was_redirected
Usage
http_was_redirected(r)
Arguments
r |
an httr response object, e.g. from a call to httr::GET() |
Value
list with slots was_redirected
, redirected_from
and redirected_to
References
Function in large parts taken from https://petermeissner.de/blog/2018/11/07/using-httr-to-detect-redirects/.
Examples
## Not run:
r <- httr::GET("http://httpbin.org/redirect/2")
pxweb:::http_was_redirected(r)
## End(Not run)
[Package pxweb version 0.17.0 Index]