Fix Accept header name and update API version to 2.20#163
Merged
aaronwolen merged 1 commit intomasterfrom Feb 22, 2026
Merged
Conversation
The Accept header was incorrectly set as `Accept-Header`, so API version pinning never actually worked. Fixed the header name to `Accept`. Since version pinning was never functional, enabling it now (with any version) changes API behavior and breaks live download tests. For safety, version pinning is now disabled by default -- the Accept header requests JSON:API content without specifying a version, matching the package's historical behavior. Other changes: - Changed version parameters from numeric to character to preserve versions like "2.20" (R truncates this to 2.2 as a numeric) - Hardcoded the URL path prefix to "v2" instead of deriving it from the (now-optional) version parameter
b2f3b4d to
cd0cdc9
Compare
Merged
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.
Summary
.build_client():Accept-Header->Accept. This bug meant API version pinning via the Accept header never actually worked.versionparameters from numeric to character to preserve versions like "2.20", which R silently truncates to 2.2 as a numeric value.Notes
Explicitly pinning to a specific API version (e.g., v2.20) is left as a follow-up task. Attempting to pin to v2.20 caused all live download tests to fail with 404s from Waterbutler, likely because the version-pinned OSF API response format differs from the unpinned default in ways that affect file ID extraction. This needs investigation before version pinning can be safely enabled.
Test plan
.build_client()verifying theAcceptheader behavior with and without version pinning