Add response size (bytes) to view
mfinelli opened this issue · comments
Mario Finelli commented
Best place is probably next to the "status" line e.g., "Status: 200, Response size: 400 bytes". It would be nice to make it human readable (with a toggle to raw bytes).
Data Khukhua commented
Hi, I have question about this issue . Is it right that response size in bytes is
body, err := ioutil.ReadAll(res.Body)
len(body) // <----
Mario Finelli commented
len(body)
is probably good enough. In theory we could also read a Content-Length
header if it exists, but not all webservers or response types will send that header so I think it's better to just read the actual size of the body once we have the whole thing.
Mario Finelli commented
Resolved in fd4d5e4