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

add interceptor for http clients #66

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Ramanjs
Copy link

@Ramanjs Ramanjs commented Mar 14, 2023

Hi @re-Tick, I was thinking about the process to intercept all HTTP requests, so I wrote up a quick prototype of how we could do this using @mswjs/interceptors package by reusing code from the node-fetch integration. It is intercepting and recording mocks for Axios but has a little problem in converting the response body readable stream to string right now. I'll try to figure that part out, but what do you think about the overall structure?

@developer-diganta
Copy link

@re-Tick Can you please review this?

@re-Tick
Copy link
Contributor

re-Tick commented Mar 19, 2023

Hi @Ramanjs, the structure looks good to me. We have to pass the ctx to the ProcessDep as an argument to mock/capture the outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants