-
Notifications
You must be signed in to change notification settings - Fork 46
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
Proxy Requests for Unknown Paths #56 #84
base: master
Are you sure you want to change the base?
Conversation
Request stream only should be consumed if we could find the path in mock files, else don’t consume as the stream will be needed to proxy the request.
@sideshowcoder everything works now, take a look at this, let me know if you have some comments. I need you help documenting this into README |
Thanks for all your work :) I will look through it as soon as possible not gonna make it today but likely tomorrow. I have to think about a little I guess but first look thorugh looks very good :) |
@sideshowcoder no problemo |
@@ -295,6 +295,7 @@ Release History | |||
--------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after the https://github.com/sideshowcoder/canned/blob/feature-56_proxy_request/README.md#variable-responses section you could add a new section to the README detailing how the proxy stuff works, this would need to contain some examples on how to use it with the commands to enter and the flow of a request through canned with a proxy enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sideshowcoder yep i will do that, but give me till this weekend, because i am travelling till wednesday
Looks very good! One thing I would suggest as a refactor is moving the proxy response into its own object, we already have the |
@sideshowcoder well it would definitely makes sense, and i also like to do it, but i would propose to have a refactor PR, problems i see currently are
I see that you already got a proposal to use promises, and you found its pros to not weight in for a change, i want to have another try at it, so lets keep this PR paused, and let me work on a proposal for refactor and then come back to this PR ? Do you agree with my idea, because i would really like to make the code organised better and performant, before we do much stuff on additional features, i could make a spec, and then we can work our way up. |
@git-jiby-me I'm happy to have this PR in with the small changes according to the comments if you are alright with that. Than we can refactor towards a better split. I fear that if we keep this on hold much is going to move and this is not going to be mergable anymore soon. What do you think about making the small changes + README and merge this and open a 2. PR for the refactor? Or are we already agreeing on this and I missread, if so sorry. |
@sideshowcoder i am ok to go with the small changes, i will have them pushed by this week end 👍 |
Awesome! |
@sideshowcoder i will add documentation some day soon, within this week |
@sideshowcoder added documentation as well, have a look and let me know, if its good to merge |
Just looked through it sorry for the slow response but it was a busy weekend. I think this now looks good to me! You might want to squash the commits before merging (http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) the workflow would be like
now when you reload the PR this should only have one commit in it. As there are many commits in this PR it makes it a little cleaner. If you need help feel free reach out and I can help! Thank you so much for all the work this has been on my list for long and it is a really nice implementation! |
@sideshowcoder i kind of lost on this because of work, will get this done next week |
bumping this PR since i could really use this feature. please lmk if there is any way i can help. |
@buzzdecafe I guess the thing left is to confirm it works, rebase against master and thats it. I'm happy to merge probably after the weekend. I can take a look on monday but help is much appriciated to a) confirm it works, and b) rebase with current master. |
@sideshowcoder After rebasing master onto that branch I am getting 71/73 test failures. 😄 Looks like there have been some API changes since this PR. So no, it doesn't work yet. |
proxy
in options as a domain to forward requests with unknown path to