url_exists: Check if a URL is accessible

Description Usage Arguments References

View source: R/url_exists.R

Description

This is useful for checking if URLs are accessible.

Usage

1
url_exists(x, ..., non_2xx_return_value = FALSE, quiet = FALSE)

Arguments

x

a single URL

...

other params (timeout() would be a good one) passed directly to httr::HEAD() and/or httr::GET()

non_2xx_return_value

what to do if the site exists but the HTTP status code is not in the 2xx range. Default is to return FALSE.

quiet

if not FALSE, then every time the non_2xx_return_value condition arises a warning message will be displayed. Default is FALSE.

References

https://stackoverflow.com/questions/52911812/check-if-url-exists-in-r


KoderKow/kowr documentation built on July 19, 2021, 4:18 p.m.