Rev 7946 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{getCurlHandle}\alias{getCurlHandle}\alias{getCurlMultiHandle}\alias{dupCurlHandle}\title{Create libcurl handles}\description{These functions create and duplicate curl handlesfor use in calls to the HTTP facilities provided bythat low-level language and this R-level interface.A curl handle is an opaque data type that contains areference to the internal C-level data structureof libcurl for performing HTTP requests.The \code{getCurlMutliHandle} returns an objectthat can be used for concurrent, multiple requests.It is quite different from the regular curl handleand again, should be treated as an opaque data type.}\usage{getCurlHandle(..., .opts = NULL, .encoding = integer(),.defaults = getOption("RCurlOptions"))dupCurlHandle(curl, ..., .opts = NULL, .encoding = integer())getCurlMultiHandle(..., .handles = list(...))}\arguments{\item{curl}{the existing curl handle that is to be duplicated}\item{...}{a named list of curl options to set after the handle hasbeen created. For \code{getCurlMultiHandle}, these values areinvidivual curl handle objects, created via \code{getCurlHandle} or \code{dupCurlHandle}. }\item{.opts}{a named list or \code{CURLOptions} object identifying thecurl options for the handle. These and the \code{...} arguments areused after the handle has been created.}\item{.encoding}{an integer or a string that explicitly identifies theencoding of the content that is returned by the HTTP server in itsresponse to our query. The possible strings are\sQuote{UTF-8} or \sQuote{ISO-8859-1}and the integers should be specified symbolicallyas \code{CE_UTF8} and \code{CE_LATIN1}.Note that, by default, the package attempts to process the header ofthe HTTP response to determine the encoding. This argument is usedwhen such information is erroneous and the caller knows the correctencoding.}\item{.defaults}{a collection of default values taken from R'sglobal/session options. This is a parameter so that one can overrideit if necessary.}\item{.handles}{a list of curl handle objects that are used as theindividual request handles within the multi-asynchronous requests}}\details{These functions create C-level data structures.}\value{An object of class \code{CURLHandle}which is simply a pointer to the memory for the Cstructure.}\references{Curl homepage \url{https://curl.se/}}\author{Duncan Temple Lang}\seealso{\code{\link{getURL}}\code{\link{curlPerform}}}\examples{options(RCurlOptions = list(verbose = TRUE,followlocation = TRUE,autoreferer = TRUE,nosignal = TRUE))if(url.exists("https://www.omegahat.net/RCurl")) {x = getURL("https://www.omegahat.net/RCurl")# here we override one of these.x = getURL("https://www.omegahat.net/RCurl", verbose = FALSE)}}\keyword{IO}