How do I ungzip (decompress) a NodeJS request's module gzip response body?

前端 未结 9 1223
日久生厌
日久生厌 2020-11-27 04:21

How do I unzip a gzipped body in a request\'s module response?

I have tried several examples around the web but none of them appear to work.

request(         


        
9条回答
  •  时光说笑
    2020-11-27 04:56

    try adding encoding: null to the options you pass to request, this will avoid converting the downloaded body to a string and keep it in a binary buffer.

提交回复
热议问题