linkedin / flashback

mock the internet
BSD 2-Clause "Simplified" License
578 stars 54 forks source link

supprt new mode of read write #32

Open jongler opened 5 years ago

jongler commented 5 years ago

Hi, If i understood correctly, flashback support only 2 modes: record & play. This is great but IMO it misses very important mode. In Betamx, it was called READ_WRITE mode. Lets say i have a scene file with 1 recorder http request-response from web service1. Now, lets say i want to record another request-response from another service2. If i set mode to record, it will overwrite the already recorded service1 request-response. So what i want to suggest is to add another mode READ_WRITE . In this mode first we read the scene file if there is a match, play the recorded one, if there isn't go outside and record the new one. The new one will be appended to the file and will not override the previous recorder ones. Just like READ_WRITE in betamax.

IMO this feature is must, i'm using it all the time

sf1152 commented 5 years ago

Make sense. It might require small changes. Basically, we start mitm proxy in normal proxy mode which allow request going out. And then allow write any unmatched request/response.