curlSetOpt {RCurl} | R Documentation

## Set values for the CURL options

### Description

This function allows us to set values for the possible options in the CURL data structure that defines the HTTP request. These options persist across calls in the `CURLHandle` object.

### Usage

    curlSetOpt(..., .opts = list(), curl = getCurlHandle(), .encoding = integer())

### Arguments

`...` | a named list of curl options to set after the handle has been created.
`.opts` | a named list or `CURLOptions` object identifying the curl options for the handle.
`curl` | the `CURLHandle` object created earlier via a call to `getCurlHandle` or `dupCurlHandle`
`.encoding` | an integer or a string that explicitly identifies the encoding of the content that is returned by the HTTP server in its response to our query. The possible strings are ‘UTF-8’ or ‘ISO-8859-1’ and the integers should be specified symbolically as `CE_UTF8` and `CE_LATIN1`. Note that, by default, the package attempts to process the header of the HTTP response to determine the encoding. This argument is used when such information is erroneous and the caller knows the correct encoding.

### Value

An integer value giving the status of the return. This should be 0 as if there was an error in the libcurl mechiansim, we will throw it there.

### Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

### References

Curl homepage http://curl.haxx.se

### See Also

`getCurlHandle` `dupCurlHandle`

[Package RCurl version 0.98-1 Index]