Gzip compression in Phoenix framework
config :example_app, ExampleApp.Endpoint, http: [port: 4040, compress: true], debug_errors: true, code_reloader: true, check_origin: false, watchers: 
When you send a HTTP request, include
Accept-Encoding header. if you use the
curl command, it has the option
Accept-Encoding: gzip, deflate
However it seems that Cowboy, which is the HTTP server used in Phoenix framework, doesn’t compress response body if its size is smaller than 300 bytes.