Thanks Chris, but I found the 'real' problem that I was facing. You only need to use a combination of request headers (Accept-Encoding, User-Agent) supporting compressed output, see:
> GET /test HTTP/1.1
> Accept: */*
> User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
> Accept-Encoding: gzip
>
< HTTP/1.1 200 OK
< content-type: application/json; charset=utf-8
...
< Content-Encoding: gzip
...
< Server: Google Frontend
< Transfer-Encoding: chunked
...
Caveat:
If you send an user agent like curl/7.47.0 or HTTPie/0.9.2, the output will not be compressed. (weird)
I tried using the compression module and I got the same behavior as above.
Regards,
Ivan