Skip to content

Commit 90030ca

Browse files
committed
Include RCurlOptions in get_figure method
1 parent 6b8ca78 commit 90030ca

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

R/plotly.R

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ For more help, see https://plot.ly/R or contact <[email protected]>.")
8282

8383
# public attributes/methods that the user has access to
8484
pub <- list(username=username, key=key, filename="from api", fileopt=NULL,
85-
version="0.5.1")
85+
version="0.5.14")
8686
priv <- list()
8787

8888
pub$makecall <- function(args, kwargs, origin) {
@@ -91,7 +91,7 @@ For more help, see https://plot.ly/R or contact <[email protected]>.")
9191
if (is.null(kwargs$fileopt))
9292
kwargs$fileopt <- NULL
9393
url <- paste(base_url, "/clientresp", sep="")
94-
94+
9595
respst <- postForm(url, platform="R", version=pub$version,
9696
args=toJSON(args, digits=50, collapse=""), un=pub$username,
9797
key=pub$key, origin=origin,
@@ -101,7 +101,7 @@ For more help, see https://plot.ly/R or contact <[email protected]>.")
101101
"cacert.pem",
102102
package="RCurl")))
103103
if (is.raw(respst)) {
104-
respst <- rawToChar(respst)
104+
respst <- rawToChar(respst)
105105
}
106106

107107
resp <- fromJSON(respst, simplify = FALSE)
@@ -171,7 +171,10 @@ For more help, see https://plot.ly/R or contact <[email protected]>.")
171171
sep="/"),
172172
httpheader=headers,
173173
writefunction=response_handler$update,
174-
headerfunction=header_handler$update)
174+
headerfunction=header_handler$update,
175+
.opts=list(sslversion=1, # 1 is for TLSv1
176+
cainfo=system.file("CurlSSL", "cacert.pem",
177+
package="RCurl")))
175178
resp_header <- as.list(parseHTTPHeader(header_handler$value()))
176179

177180
# Parse status

0 commit comments

Comments
 (0)