While testing Spring GZIP compression on REST endpoint observed, with or without compression enabled postman response size showed original response size.
Content-encoding still showed as gzip, but the response size in postman is always uncompressed/original response size. This made me wonder is response compressed or not. Only after checking in chrome realised, Postman always showed uncompressed response size.
Wanted to know why postman always shows uncompressed/original response size..? Is there a option to view compressed response size in Postman..? or Is postman not the right tool to measure response size..?
When you want to check if content is compressed, you have to look at the content encoding of the response, and to check if the content length changes between compressed and uncompressed content. For example, this is a compressed object, notice the Content-Encoding header and the object size.
Since Brotli was designed to compress streams on the fly, it is faster at both compressing content on the server and decompressing it in the browser than in gzip. In some cases the overall front-end decompression is up to 64% faster than gzip.
To do this, go to Settings > General > Max response size in MB and adjust the value to 100.
To compress the HTTP request body, you must attach the HTTP header indicating the sending of HTTP request body compressed in gzip format while sending the request message from the Web Service client. Implement the processing for attaching the HTTP header in the client application.
Instead of wasting time on Postman, I found Fiddler is the easiest way to read network size
Postman is actually using Jquery-style stuff to POST/GET/PUSH... data, then show result somehow. and the Network
tab is not always working well. In my case, it never shows once how much data was transferred back, same in my teammates' environments.
[NOTE] Fiddler gives you correct Tunnel Received
only when request-response are in different physical location of intranet/internet.
Here is same API with different CompressionLevel
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With