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

Expose connect options and the client socket via a _mitm property #33

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

Conversation

papandreou
Copy link
Contributor

Fixes #14.

I ran into a scenario where it was impossible to pair up client sockets, connect options, and HTTP requests using the current API.

This (or something similar) makes it possible to avoid the guesswork and actually simplify my code a bit: https://github.com/unexpectedjs/unexpected-mitm/pull/19/files

@papandreou
Copy link
Contributor Author

@moll Any feedback on this, or the general idea of providing it?

@papandreou papandreou force-pushed the feature/exposeClientSocketAndOptions branch from c1727bd to eaf0459 Compare August 25, 2016 07:40
@dempfi
Copy link

dempfi commented May 21, 2017

This PR also gives a nice way to bypass requests. Like described in #16.

@jakzo
Copy link

jakzo commented Nov 7, 2018

@moll Is there any update on this? My specific problem is that I use .on('request') but I have no way of knowing the full URL since the protocol could be http or https. This PR would solve this issue.

@papandreou
Copy link
Contributor Author

Ping @moll?

@papandreou papandreou closed this Jun 28, 2020
@moll
Copy link
Owner

moll commented Dec 20, 2021

I think this still needs addressing. I'll reopen to come around to it eventually. And oh, Feb 17, 2020— that was almost before the apocalypse. Good times!

@moll moll reopened this Dec 20, 2021
@forty
Copy link

forty commented Nov 3, 2023

@moll Hi there! This looks super useful, do you think this MR could be moved forward? TIA!

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.

Make connect opts available to request listeners
5 participants