Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

act as proxy/intercept #94

Closed
sdg9 opened this issue Apr 30, 2022 · 2 comments · Fixed by #96
Closed

act as proxy/intercept #94

sdg9 opened this issue Apr 30, 2022 · 2 comments · Fixed by #96
Assignees
Labels
enhancement New feature or request

Comments

@sdg9
Copy link
Collaborator

sdg9 commented Apr 30, 2022

For our initial use case fetch is likely the best place to start.

Idea is with a line of code or two clients using the fetch API actually have their requests processed directly by mezzo to persist to disc for future replay.

Code out there to get familiar with

Possible alternative implementation are acting as a layer 7/TLS terminating proxy or supporting XHR.

Poly has a nice configurable implementation, for example we could create a new "adapter" package for a fetch interceptor and a new "persister" package for fs storage and let the user customize it as desired.

@sdg9 sdg9 added the enhancement New feature or request label Apr 30, 2022
@sdg9 sdg9 changed the title act as proxy? Allow exporting or saving of chlsj json style file? act as proxy? Allow exporting or saving of chlsj json or HAR style file? Apr 30, 2022
@sdg9 sdg9 self-assigned this Apr 30, 2022
@sdg9
Copy link
Collaborator Author

sdg9 commented May 5, 2022

How reactotron does it https://github.com/infinitered/reactotron-react-native/blob/master/src/plugins/networking.ts

Per this comment

In react-native fetch is being polyfilled by whatwg-fetch and uses XMLHttpRequest internally. On the web, you are right; it is a different implementation.

@sdg9
Copy link
Collaborator Author

sdg9 commented May 12, 2022

Moving recording to separate issue

@sdg9 sdg9 changed the title act as proxy? Allow exporting or saving of chlsj json or HAR style file? act as proxy/intercept May 12, 2022
This was referenced May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant