Learn R Programming

spsUtil (version 0.2.2.1)

checkUrl: check if an URL can be reached

Description

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

Usage

checkUrl(url, timeout = 5)

Value

`TRUE` if url is reachable, `FALSE` if not

Arguments

url

string, the URL to request

timeout

seconds to wait before return FALSE

Examples

Run this code
checkUrl("https://google.com")
try(checkUrl("https://randomwebsite123.com", 1))

Run the code above in your browser using DataLab