From ee06f495e56cdcdcdd0064e6ad8ea0adccd65e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 5 Dec 2020 19:33:49 +0100 Subject: [PATCH] Rename --- R/github.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/github.R b/R/github.R index a1a01b71..05a4bcef 100644 --- a/R/github.R +++ b/R/github.R @@ -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() @@ -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) @@ -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 { @@ -128,10 +128,10 @@ 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) + res <- curl::github_curl_fetch_memory(url, handle = h) if (!(res$status_code %in% accept)) { if (res$status_code >= 300) {