I am using jax-rs and I want to enable compression.
Is setting the header sufficient to enable compression?
headers.add("Accept-Encoding", "gzip, deflate");
According to How to enable gzip compression for content encoding with Jersey (JAX-RS 2.0) client?, there is a "GZipEncoder.class" but Jax-RS has not such a class.
client.register(GZipEncoder.class);