Skip to content

Commit e72a50f

Browse files
committed
import base64enc
1 parent 0b2eeb9 commit e72a50f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

DESCRIPTION

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Imports:
3030
jsonlite,
3131
magrittr,
3232
digest,
33-
viridis
33+
viridis,
34+
base64enc
3435
Suggests:
3536
dplyr,
3637
maps,

R/utils.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,14 @@ get_kwargs <- function() {
154154
}
155155

156156
# POST header fields
157+
#' @importFrom base64enc base64encode
157158
plotly_headers <- function(type = "main") {
158159
usr <- verify("username")
159160
key <- verify("api_key")
160161
h <- if (type == "v2") {
161162
c(
162-
"Plotly-Username" = base64enc::base64encode(charToRaw(usr)),
163-
"Plotly-Apikey" = base64enc::base64encode(charToRaw(key)),
163+
"plotly-username" = base64enc::base64encode(charToRaw(usr)),
164+
"plotly-apikey" = base64enc::base64encode(charToRaw(key)),
164165
"Plotly-Client-Platform" = paste("R", as.character(packageVersion("plotly")))
165166
)
166167
} else {

0 commit comments

Comments
 (0)