File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ process <- function(resp) {
99process.clientresp <- function (resp ) {
1010 httr :: stop_for_status(resp )
1111 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 )
1214 if (nchar(con $ error ) > 0 ) stop(con $ error , call. = FALSE )
1315 if (nchar(con $ warning ) > 0 ) warning(con $ warning , call. = FALSE )
1416 if (nchar(con $ message ) > 0 ) message(con $ message , call. = FALSE )
@@ -27,6 +29,8 @@ process.figure <- function(resp) {
2729 con <- from_JSON(content(resp , as = " text" ))
2830 fig <- con $ payload $ figure
2931 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 )
3034 fig <- add_boxed(fig )
3135 fig $ data [[1 ]]$ inherit <- FALSE
3236 # any reasonable way to return a data frame?
You can’t perform that action at this time.
0 commit comments