ijpiantanida / talkback

A simple HTTP proxy that records and playbacks requests
MIT License
284 stars 41 forks source link

Ability to modify req before making request ? #28

Closed ball6847 closed 5 years ago

ball6847 commented 5 years ago

I have a situation where I want to store human readable content but I cannot do that because my browser always send 'accept-encoding': 'gzip, deflate, br' and it will be passed to backend server as well and my response body always end up base64 encoded.

I tried using chrome extension to remove 'accept-encoding from headers. Server then returns plain text and talkback also store response body in json. But this is not good when we work as a team. I think there should be a way to handle this kind of situation when we setting up talkback server.

Thanks for making talkback I really like it.

ijpiantanida commented 5 years ago

Hi @ball6847. This is something that I've thought about before. Ideally I'd like Talkback to be able to decompress the response, store it in plain text (and pretty-printed), and re-compress it on playback.

In the meantime I've released v1.11.0 which adds the requestDecorator option. You can see your specific use case in the README example.

Glad you like talkback :)