File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ process <- function(resp) {
9
9
process.clientresp <- function (resp ) {
10
10
httr :: stop_for_status(resp )
11
11
con <- from_JSON(httr :: content(resp , as = " text" ))
12
+ # make sure that we always return a HTTPS link
13
+ con $ url <- sub(" ^http[s]?:" , " https:" , con $ url )
12
14
if (nchar(con $ error ) > 0 ) stop(con $ error , call. = FALSE )
13
15
if (nchar(con $ warning ) > 0 ) warning(con $ warning , call. = FALSE )
14
16
if (nchar(con $ message ) > 0 ) message(con $ message , call. = FALSE )
@@ -27,6 +29,8 @@ process.figure <- function(resp) {
27
29
con <- from_JSON(content(resp , as = " text" ))
28
30
fig <- con $ payload $ figure
29
31
fig $ url <- sub(" apigetfile/" , " ~" , resp $ url )
32
+ # make sure that we always return a HTTPS link
33
+ con $ url <- sub(" ^http[s]?:" , " https:" , con $ url )
30
34
fig <- add_boxed(fig )
31
35
fig $ data [[1 ]]$ inherit <- FALSE
32
36
# any reasonable way to return a data frame?
You can’t perform that action at this time.
0 commit comments