Skip to content

Commit 2fa1dde

Browse files
authored
Rename env var (#169)
* Rename env var * Add NEWS bullet
1 parent 349db57 commit 2fa1dde

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# httr2 (development version)
22

3+
* The environment variable `HTTR2_REFRESH_TOKEN` replaces the previous `HTTR_REFRESH_TOKEN` (@jennybc, #169).
4+
35
* OAuth tokens can now be refreshed. One, two, or even more times! (@jennybc, #166)
46

57
* Can now print responses where content type is the empty string (@mgirlich, #163).

R/oauth-flow-refresh.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#' req <- request("https://example.com")
2424
#' req %>% req_oauth_refresh(client)
2525
req_oauth_refresh <- function(req, client,
26-
refresh_token = Sys.getenv("HTTR_REFRESH_TOKEN"),
26+
refresh_token = Sys.getenv("HTTR2_REFRESH_TOKEN"),
2727
scope = NULL,
2828
token_params = list()) {
2929

@@ -51,13 +51,13 @@ req_oauth_refresh <- function(req, client,
5151
#' @param refresh_token A refresh token. This is equivalent to a password
5252
#' so shouldn't be typed into the console or stored in a script. Instead,
5353
#' we recommend placing in an environment variable; the default behaviour
54-
#' is to look in `HTTR_REFRESH_TOKEN`.
54+
#' is to look in `HTTR2_REFRESH_TOKEN`.
5555
#' @family OAuth flows
5656
#' @returns An [oauth_token].
5757
#' @export
5858
#' @keywords internal
5959
oauth_flow_refresh <- function(client,
60-
refresh_token = Sys.getenv("HTTR_REFRESH_TOKEN"),
60+
refresh_token = Sys.getenv("HTTR2_REFRESH_TOKEN"),
6161
scope = NULL,
6262
token_params = list()) {
6363
oauth_flow_check("refresh", client)

man/oauth_flow_refresh.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/req_oauth_refresh.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)