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

feat(fetch): intercept response #530

Merged
merged 4 commits into from
Jan 4, 2020
Merged

Conversation

AndersDJohnson
Copy link
Member

@AndersDJohnson AndersDJohnson commented Jan 4, 2020

Response option functions like functions like json, text, status, headers, etc., can now be defined with a 2nd res argument after existing req argument. Any such response option will cause Mockyeah to actually make a real fetch call to that URL, and then give your function the response data as res (with status, headers, and body fields) which you can then manipulate or derive a mock response.

Fixes #403.

Relates to #441.

@AndersDJohnson AndersDJohnson merged commit dd21840 into master Jan 4, 2020
@AndersDJohnson AndersDJohnson deleted the response-transform branch January 4, 2020 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: post proxy/fixture response transform
1 participant