Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Dec 5, 2020
1 parent b3d72db commit e559eb3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/github.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ github_GET <- function(path, ..., host = "api.github.com", pat = github_pat(), u
}
)

res <- curl_fetch_memory(url, headers)
res <- github_curl_fetch_memory(url, headers)
json$parse(raw_to_char_utf8(res$content))
} else {
tmp <- tempfile()
Expand All @@ -36,7 +36,7 @@ github_commit <- function(username, repo, ref = "HEAD",
}
)

res <- curl_fetch_memory(url, headers, accept = 304)
res <- github_curl_fetch_memory(url, headers, accept = 304)

if (res$status_code == 304) {
return(current_sha)
Expand Down Expand Up @@ -114,7 +114,7 @@ github_DESCRIPTION <- function(username, repo, subdir = NULL, ref = "HEAD", host
}
)

res <- curl_fetch_memory(url, headers)
res <- github_curl_fetch_memory(url, headers)

raw_to_char_utf8(res$content)
} else {
Expand All @@ -128,7 +128,7 @@ github_DESCRIPTION <- function(username, repo, subdir = NULL, ref = "HEAD", host
}
}

curl_fetch_memory <- function(url, headers, accept = NULL) {
github_curl_fetch_memory <- function(url, headers, accept = NULL) {
h <- curl::new_handle()
curl::handle_setheaders(h, .list = headers)
res <- curl::curl_fetch_memory(url, handle = h)
Expand Down

0 comments on commit e559eb3

Please sign in to comment.