SpectoLabs / hoverfly

Lightweight service virtualization/ API simulation / API mocking tool for developers and testers
https://hoverfly.io
Apache License 2.0
2.35k stars 208 forks source link

application/json and gzip #787

Open phink0 opened 5 years ago

phink0 commented 5 years ago

When a captured response has Content-Type: application/json and Content-Encoding: gzip it is encoded in Base64 in the simulation file.

Uncompressing this response to normal JSON text in the simulation file would enhance readability and understanding, make editing and versioning easier.

In simulate mode such a response could or should be compressed again to be closer to the actual API.

JohnFDavenport commented 5 years ago

Related to #815

GeorgeRadev commented 4 years ago

Could there be an option for hoverctl export to decompress the gzip content ?

I agree that decompressing should be out of the proxy functionality, and decompression is mostly needed when simulation is going to be edited for creating new simulations. Thus, if export provide optional decompressing recordings it will be much easier to edit exported simulations and loading them after that.