Check to see if a given resource is online and accessible over the internet

online(uri, strict = FALSE, timeout = getOption(x = "timeout"))

Arguments

uri

The URI of a given resource

strict

Ensures the HTTP status code is 200

timeout

Timeout in seconds; defaults to the option “timeout” (currently set to 60 seconds)

Value

TRUE if uri is accessible, otherwise FALSE

Note

This function requires the httr package to be installed