feat: support Expo fetch interception#308
Open
V3RON wants to merge 2 commits into
Open
Conversation
Capture Expo fetch responses through a dedicated interceptor while keeping XHR and old RN fetch on the existing path. Adds shared response-body helpers, fetch body lookup, and source labels in the UI.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Guard Expo fetch interception behind an optional resolver. Patch the module export instead of global fetch so Expo requests are captured reliably.
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.
What is this?
This PR makes Expo
fetchrequests show up in Network Activity whenexpo/fetchis available. Before this, those requests could slip past the interceptor because Expo uses its own fetch module instead of the global fetch hook.How does it work?
This PR resolves
expo/fetchat runtime and only enables the Expo fetch interceptor when the module exists. When it does, we patch the Expo module export directly, capture the request/response lifecycle from the Expo response stream, and store the body in the shared registry so the existing details panel can render it. Built-in React Native fetch and raw XHR continue to use the existing XHR path.Why is this useful?