moll / node-mitm

Intercept and mock outgoing Node.js network TCP connections and HTTP requests for testing. Intercepts and gives you a Net.Socket, Http.IncomingMessage and Http.ServerResponse to test and respond with. Super useful when testing code that hits remote servers.
Other
637 stars 48 forks source link

Added record functionality #38

Closed framp closed 7 years ago

framp commented 7 years ago

This pull request adds support for recording requests, piggybacking on mitm.js support for intercepting net calls.

The data is going to be emitted via a record event.

framp commented 7 years ago

@moll I'm thinking of using this feature in another library, so I'd love any inputs on the exposed API

framp commented 7 years ago

No answer, so I will publish the project under a different name.

Happy to have a discussion about this - feel free to merge https://github.com/moll/node-mitm/pull/40

moll commented 7 years ago

Hey! Thanks and absolutely, get it going under your own name and then once I'm back on a PR review roll, we'll see if something can be united. :)