decompress-response
Advanced tools
Decompress a HTTP response if needed
Weekly downloads
Changelog
content-encoding
header if the respose is passed through b35646bhttps://github.com/sindresorhus/decompress-response/compare/v7.0.0...v8.0.0
Readme
Decompress a HTTP response if needed
Decompresses the response from http.request
if it's gzipped, deflated or compressed with Brotli, otherwise just passes it through.
Used by got
.
npm install decompress-response
import http from 'node:http';
import decompressResponse from 'decompress-response';
http.get('https://sindresorhus.com', response => {
response = decompressResponse(response);
});
Returns the decompressed HTTP response stream.
Type: http.IncomingMessage
The HTTP incoming stream with compressed data.
Decompress a HTTP response if needed
The npm package decompress-response receives a total of 14,986,471 weekly downloads. As such, decompress-response popularity was classified as popular.
We found that decompress-response demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.