Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getCurlInfo

Access information about a CURL request


Description

This function provides access to data about a previously executed CURL request that is accessible via a CURLHandle object. This means, of course, that one must have access to the CURLHandle object. The information one can get includes items such as the name of the file (potentially containing redirects), download time,

See getCurlInfoConstants for the names of the possible fields.

Usage

getCurlInfo(curl, which = getCurlInfoConstants())
getCurlInfoConstants()

Arguments

curl

the 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.

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 getCurlInfoConstants

.

Details

This is an interface to the 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.

Author(s)

Duncan Temple Lang

References

Curl homepage http://curl.haxx.se

See Also

Examples

if(url.exists("http://www.omegahat.net/RCurl/index.html")) withAutoprint({
    curl = getCurlHandle()
    txt = getURL("http://www.omegahat.net/RCurl/index.html", curl = curl)
    getCurlInfo(curl)
    rm(curl)  # release the curl!
 })

RCurl

General Network (HTTP/FTP/...) Client Interface for R

v1.98-1.3
BSD_3_clause + file LICENSE
Authors
CRAN Team [ctb, cre] (de facto maintainer since 2013), Duncan Temple Lang [aut] (<https://orcid.org/0000-0003-0159-1546>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.