Rev 7762 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{url.exists}\alias{url.exists}\title{Check if URL exists}\description{This functions is analogous to \code{\link[base]{file.exists}}and determines whether a request for a specific URL respondswithout error. We make the request but ask the servernot to return the body. We just process the header.}\usage{url.exists(url, ..., .opts = list(...),curl = getCurlHandle(.opts = .opts),.header = FALSE)}\arguments{\item{url}{a vector of one or more URLs whose existence we are to test}\item{\dots}{name = value pairs of Curl options.}\item{.opts}{a list of name = value pairs of Curl options.}\item{curl}{a Curl handle that the caller can specify if she wants toreuse an existing handle, e.g. with different options alreadyspecified or that has previously established a connection to the Webserver}\item{.header}{a logical value that if \code{TRUE} causes the headerinformation to be returned.}}\details{This makes an HTTP request but with the nobody option set to\code{FALSE} so that we don't actually retrieve the contents of the URL.}\value{If \code{.header} is \code{FALSE}, this returns\code{TRUE} or \code{FALSE} for each URL indicating whetherthe request was successful (had a status with a valuein the 200 range).If \code{.header} is \code{TRUE}, the header is returned for therequest for each URL.}\references{HTTP specification}\author{Duncan Temple Lang}\seealso{\code{\link{curlPerform}}}\examples{url.exists("https://www.omegahat.net/RCurl")try(url.exists("https://www.omegahat.net/RCurl-xxx"))}