that looks like you’re logging a binary response, which will always look unreadable if you output it with --http-debug=full.
In these cases I would suggest logging the headers only (so just --http-debug), and selectively doing console.log(resp.body) on responses whose bodies you know are plain text (checking the Content-Type header, maybe).
@imiric : Most of my responses are not in text/html format, and mostly are in json and other formats, so how can I view the response of these requests.
If they’re in JSON then they should render OK with --http-debug=full.
If “other formats” includes binary data, then you’ll need to decode it appropriately depending on the format (Content-Type) and console.log() the plain text data. Again, --http-debug=full will not render these responses correctly as it doesn’t process the response bodies.
It looks like the content is brotli-encoded. Ideally, http-debug=full would decode the response but I suspect it is not (otherwise you would see the JSON in clear-text).
You may want to consider using a web proxy application like Fiddler, charlesproxy, mitmproxy, et. al, along with setting the https_proxy environment variable to the address that the proxy listens on. Doing so will route all requests through that proxy and allow you to view the HTTP request/response data in a more intuitive UI. They should also take care of any content encoding.
We’ve had a few issues with --http-debug so far (#986, #1042), and this is an additional one that doesn’t work as users expect it to, so I created #2112.
In upcoming versions we’d like to introduce a better way of debugging responses, see #1043, but it’s among a long list of wanted features, so feel free to give it a thumbs up in support.