curlGlobalInit | R Documentation |
These functions provide a way to both start/initialize
and stop/uninitialize the libcurl engine.
There is no need to call
curlGlobalInit
as it is done implicitly the
first time one uses the libcurl facilities.
However, this function does permit one to explicitly
control how it is initialized.
Specifically, on Windows one might want to
avoid re-initializing the Win32 socket facilities
if the host application (e.g. R) has already done this.
curlGlobalInit
should only be called once per R session.
Subsequent calls will have no effect, or may confuse the libcurl engine.
One can reclaim the resources the libcurl engine is
consuming via the curlGlobalCleanup
function
when one no longer needs the libcurl facilities in
an R session.
curlGlobalInit(flags = c("ssl", "win32"))
curlGlobalCleanup()
flags |
flags indicating which features to activate.
These come from the |
curlGobalInit
returns a status code which should be 0.
curlGlobalCleanup
returns NULL
in all cases.
Duncan Temple Lang
Curl homepage https://curl.se/
getCurlHandle
curlPerform
# Activate only the SSL.
curlGlobalInit("ssl")
## Not run:
# Don't run these automatically as we should only call this function
# once per R session
# Everything, the default.
curlGlobalInit()
# Nothing.
curlGlobalInit("none")
curlGlobalInit(0)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.