Have Some Fun with 'HTTP' Headers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
279 B

get_response_headers <- function(url, ...) {
tryCatch(
httr::HEAD(url, ...),
error = function(e) stop(e)
) -> res
httr::warn_for_status(res)
list(
hdrs = httr::headers(res),
scheme = httr::parse_url(res$url)[["scheme"]]
) -> out
invisible(out)
}