Debian Codegraph @

man/url_accessible.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/io.R
3 \name{url_accessible}
4 \alias{url_accessible}
5 \title{Test if a URL is accessible}
6 \usage{
7 url_accessible(x, use_curl = !capabilities("libcurl"), ...)
8 }
9 \arguments{
10 \item{x}{A URL as a character string.}
11
12 \item{use_curl}{Whether to use the \pkg{curl} package or the
13 \code{curlGetHeaders()} function in base R to send the request to the URL.
14 By default, \pkg{curl} will be used when base R does not have the
15 \command{libcurl} capability (which should be rare).}
16
17 \item{...}{Arguments to be passed to \code{curlGetHeaders()}.}
18 }
19 \value{
20 \code{TRUE} or \code{FALSE}.
21 }
22 \description{
23 Try to send a \code{HEAD} request to a URL using
24 \code{\link[=curlGetHeaders]{curlGetHeaders()}} or the \pkg{curl} package, and see if it
25 returns a successful status code.
26 }
27 \examples{
28 xfun::url_accessible("https://yihui.org")
29 }