hoverfly icon indicating copy to clipboard operation
hoverfly copied to clipboard

Webserver - Capture Request mode

Open nkvp opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. Currently we do not have a capture request mode in webserver. The system I work on does not support proxying. Hence it becomes difficult to capture request due to this.

Describe the solution you'd like A capture request mode when hoverfly is run as webserver. We should have the possibility of regexp matching the request, sending too destination, receiving response, logging it, returning to client, while running as webserver

Describe alternatives you've considered Wiremock and other proxy tools have this feature where you could match a regular expression and if matched, proxy to another system.

nkvp avatar Aug 12 '19 08:08 nkvp

As far as I understand:

  1. destination should be set to something static like https://www.google.com.
  2. When a request comes in we need only to replace the host and scheme with ones from the destination.

Basically, that's a simple recording proxy to single destination (unless changed via api), right? @tommysitu Seems easy to implement.

ns3777k avatar Aug 31 '21 23:08 ns3777k

@ns3777k it's going to need a recording proxy behind the web server. The web server will rewrite the path dynamically based on the destination provided by the user in a request header field, forward the incoming request to the new destination while also recording the data.

tommysitu avatar Sep 05 '21 20:09 tommysitu