Check if a url exists with httr

url_exists(url, non_2xx_return_value = FALSE, quiet = TRUE, timeout_thres = 10)

Arguments

url

A URL to check

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 TRUE.

quiet

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

timeout_thres

timeout in seconds for httr attempt

Value

A boolean value to indicate whether a website is reachable