Skip to content

Commit d11e38f

Browse files
committed
Merge pull request #457 from ropensci/fix/domain
dont hard-code domain for POSTing
2 parents fde8b40 + db40754 commit d11e38f

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via Plotly's JavaScript Graphing Library
3-
Version: 2.4.1
3+
Version: 2.4.2
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "[email protected]"),
66
person("Chris", "Parmer", role = c("aut", "cph"),

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.4.2 -- 9 Feb 2015
2+
3+
Fix for on-premise domain configuration.
4+
15
2.4.1 -- 2 Feb 2015
26

37
Attach base_url in as.widget() so it works in multiple contexts

R/figure.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
get_figure <- function(username, id) {
1919
if (missing(username)) username <- verify("username")
2020
if (missing(id)) stop("Please provide a figure id number")
21-
base_url <- file.path("https://plot.ly/apigetfile", username, id)
21+
base_url <- file.path(get_domain(), "apigetfile", username, id)
2222
resp <- httr::GET(base_url, plotly_headers(), httr::config(ssl_verifypeer=FALSE))
2323
process(struct(resp, "figure"))
2424
}

R/plotly_POST.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ plotly_POST <- function(x, filename, fileopt = "new",
7171
args = to_JSON(x$data),
7272
kwargs = to_JSON(x[get_kwargs()])
7373
)
74-
base_url <- "https://plot.ly/clientresp"
74+
base_url <- file.path(get_domain(), "clientresp")
7575
resp <- httr::POST(base_url, body = bod)
7676
con <- process(struct(resp, "clientresp"))
7777
if (sharing[1] == "hidden") {

R/signup.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ signup <- function(username, email, save = TRUE) {
4343
platform = "R",
4444
version = as.character(packageVersion("plotly"))
4545
)
46-
base_url <- "https://plot.ly/apimkacct"
46+
base_url <- file.path(get_domain(), "apimkacct")
4747
resp <- httr::POST(base_url, body = bod)
4848
con <- process(struct(resp, "signup"))
4949
if (save) {

0 commit comments

Comments
 (0)