R/is-online.R

Defines functions is_online

Documented in is_online

#' Is your computer currently online?
#'
#' This function uses some cheap heuristics to determine if your computer is
#' currently online. It's a simple wrapper around [curl::has_internet()]
#' exported from httr2 for convenience.
#'
#' @export
#' @examples
#' is_online()
is_online <- function() {
  curl::has_internet()
}
r-lib/httr2 documentation built on Jan. 11, 2025, 10:21 a.m.