Repository navigation
Use curl, not httr, for Require's token-authenticated GitHub downloads - #256
Merged
Merged
Conversation
…uthThenNonAuth() stays on httr .downloadFileMasterMainAuth() now uses a new internal curlGETauth() (curl::curl_fetch_memory(), same bad-credentials/404 fallback). The exported GETWauthThenNonAuth() is unchanged and still returns an httr response, because SpaDES.core (module-repository.R) reads it with httr::content() and httr::stop_for_status(); httr stays in Suggests for it. checkForToken() now needs curl, not httr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXgG6hSA1CRAMhvKajR
eliotmcintire
added a commit
that referenced
this pull request
Dec 5, 2026
…folder without rprojroot (#255) * Drop unused packages from Suggests; setupOff finds the .Rproj folder with base R (no rprojroot) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXgG6hSA1CRAMhvKajR * Require's token-authenticated GitHub downloads go through curl; GETWauthThenNonAuth() stays on httr (#256) .downloadFileMasterMainAuth() now uses a new internal curlGETauth() (curl::curl_fetch_memory(), same bad-credentials/404 fallback). The exported GETWauthThenNonAuth() is unchanged and still returns an httr response, because SpaDES.core (module-repository.R) reads it with httr::content() and httr::stop_for_status(); httr stays in Suggests for it. checkForToken() now needs curl, not httr. Claude-Session: https://claude.ai/code/session_01Lx3DXgG6hSA1CRAMhvKajR Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Require downloads files from private GitHub repositories with a personal access token. These downloads now use curl, which Require already depends on, so they no longer need httr. The exported helper that other packages call keeps working exactly as before.
Affects: Users downloading from private GitHub repositories no longer need httr installed; nothing else changes.
Depends-on: #255
Technical details
curlGETauth()/curlGET()(R/Require-helpers.R) usecurl::new_handle(),handle_setheaders()andcurl_fetch_memory(). Like the httr version, it retries without the token on "Bad credentials" or a 404..downloadFileMasterMainAuth()callscurlGETauth(), writesa$contentwithwriteBin(), and stops on a 404.checkForToken()checks for curl instead of httr.GETWauthThenNonAuth()keeps its httr code and Rd, because SpaDES.core calls it throughgetFromNamespace()and reads the result withhttr::stop_for_status()/httr::content(). httr stays in Suggests for it.GETWauthThenNonAuth()is kept. Mocks in test-28 and test-31 now targetcurlGETauth.GETWauthThenNonAuth()still returns an httr response.devtools::test()(NOT_CRAN=true): 564 tests, 2496 passed, 0 failed, 0 errors, 0 warnings, 0 skipped.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXgG6hSA1CRAMhvKajR