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

Let the callback result set the URL of a response #120

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

Conversation

betatim
Copy link

@betatim betatim commented Apr 30, 2019

Hey 👋 !

This is a cool library and we are using it for testing part of our HTTP client. One thing we needed was to be able to mock a POST /some/form/action that responds with a status 302 (a few times in a row...). Depending on what you POST (correct or wrong password say) you end up being redirected somewhere else. I would like to mock this by having the response have a different URL to the request. This PR lets me do that. Is there a different way that doesn't require adding new code to the library (less code is better)?

What do you think of adding something like this?

@coveralls
Copy link

coveralls commented Apr 30, 2019

Coverage Status

Coverage remained the same at ?% when pulling e18aa95 on betatim:callback-set-url into 566461a on pnuckowski:master.

@betatim
Copy link
Author

betatim commented Apr 30, 2019

I'll work on the failing tests.

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.

2 participants