Make urlBase protected so makeFetchRequest overrides can use it - #438
Open
Ahmed8881 wants to merge 1 commit into
Open
Make urlBase protected so makeFetchRequest overrides can use it#438Ahmed8881 wants to merge 1 commit into
Ahmed8881 wants to merge 1 commit into
Conversation
makeFetchRequest is protected specifically so subclasses can override the HTTP transport, but urlBase was private, so an override had no way to read the configured base URL and had to hardcode/duplicate the production/sandbox/local-testing hosts itself. Fixes apple#424 (urlBase visibility part; the request timeout part of that issue was already addressed in apple#425).
alexanderjordanbaker
approved these changes
Aug 28, 2026
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
makeFetchRequest(index.ts) isprotectedspecifically so subclasses can override the HTTP transport, buturlBasewasprivate, so an override had no way to read the configured base URL and had to hardcode/duplicate the production/sandbox/local-testing hosts itself. This changesurlBasefromprivatetoprotected, matching the existing extension point.This is a one-line visibility change with no behavior change to the public API.
Fixes the
urlBasevisibility part of #424. (The request timeout part of that issue was already addressed in #425.)This also directly unblocks the workaround described in #352 (attaching an outbound proxy agent via a
makeFetchRequestoverride), since that override can now resolve the correct host without duplicating the private constants.Test plan
npx tsc -p .builds cleanlynpx jest— all 20 suites / 336 tests passurlBase's visibility, so no test changes were needed