Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postman - Option to view compressed response size..?

Tags:

While testing Spring GZIP compression on REST endpoint observed, with or without compression enabled postman response size showed original response size.

Compression Enabled

Compression Disabled

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.

Compression Enabled Compression Disabled

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..?

like image 766
PraveenKumar Avatar asked Nov 27 '18 05:11

PraveenKumar


People also ask

How do I know if API response is compressed?

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.

Is Brotli better than gzip?

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.

How do you increase maximum response size in Postman?

To do this, go to Settings > General > Max response size in MB and adjust the value to 100.

How do I compress a body request?

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.


1 Answers

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.

enter image description here

Here is same API with different CompressionLevel enter image description here

like image 176
Dongdong Avatar answered Sep 23 '22 14:09

Dongdong