checkUrl: check if an URL can be reached

Description Usage Arguments Value Examples

View source: R/spsUtil.R

Description

check if a URL can be reached, return TRUE if yes and FALSE if cannot or with other status code

Usage

1

Arguments

url

string, the URL to request

timeout

seconds to wait before return FALSE

Value

TRUE if url is reachable, FALSE if not

Examples

1
2
checkUrl("https://google.com")
try(checkUrl("https://randomwebsite123.com", 1))

spsUtil documentation built on Oct. 31, 2021, 1:06 a.m.