File: getCurlInfo.Rd

package info (click to toggle)
r-cran-rcurl 1.95-4.8-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,140 kB
  • ctags: 515
  • sloc: ansic: 3,135; xml: 1,734; asm: 993; sh: 12; makefile: 2
file content (60 lines) | stat: -rw-r--r-- 1,858 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
\name{getCurlInfo}
\alias{getCurlInfo}
\alias{getCurlInfoConstants}
\title{Access information about a CURL request}
\description{
  This function provides access to data about a previously
  executed CURL request that is accessible via a
  \code{CURLHandle} object.
  This means, of course, that one must have access to the \code{CURLHandle}
  object.
  The information one can get includes items such as the name of the
  file (potentially containing redirects), download time,

  See \code{\link{getCurlInfoConstants}} for the names of the possible fields.
}
\usage{
getCurlInfo(curl, which = getCurlInfoConstants())
getCurlInfoConstants()
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{curl}{the \code{CURLHandle} object used to perform the request.
    This is a reference to an opaque internal C-level data structure that is
    provided and used by libcurl to make a request.}
  \item{which}{identifiers for the elements of interest.
    These can be specified by integer value or by name.
    The names are matched against those in the
    \code{\link{getCurlInfoConstants}}}.
}
\details{
  This is an interface to the \code{get_curl_info} routine in
  the libcurl package. 
}
\value{
  A named list whose elements correspond
  to the requested fields.
  The names are expanded to match the names of these
  fields and the values are either strings or integer values.
}

\references{Curl homepage \url{http://curl.haxx.se}}
\author{Duncan Temple Lang <duncan@wald.ucdavis.edu>}



\seealso{
  \code{\link{curlPerform}}
  \code{\link{getURL}}  
  \code{\link{getCurlHandle}}
}
\examples{
 if(url.exists("http://www.omegahat.net/RCurl/index.html")) {
    curl = getCurlHandle()
    getURL("http://www.omegahat.net/RCurl/index.html", curl = curl)
    getCurlInfo(curl)
    rm(curl)  # release the curl!
 }
}
\keyword{IO}