You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Sindre Sorhus c5ca457170 3.2.0 8 years ago
test Preserve custom properties on the original stream (#8) 8 years ago
.editorconfig [BREAKING] ES2015ify 8 years ago
.gitattributes Rename to `decompress-response` and other tweaks 8 years ago
.gitignore init 9 years ago
.travis.yml [BREAKING] ES2015ify 8 years ago
index.js Preserve custom properties on the original stream (#8) 8 years ago
license init 9 years ago
package.json 3.2.0 8 years ago
readme.md Mention Got as a user of this module 8 years ago

readme.md

decompress-response Build Status

Decompress a HTTP response if needed

Decompresses the response from http.request if it's gzipped or deflated, otherwise just passes it through.

Used by got.

Install

$ npm install decompress-response

Usage

const http = require('http');
const decompressResponse = require('decompress-response');

http.get('http://sindresorhus.com', response => {
	response = decompressResponse(response);
});

License

MIT © Sindre Sorhus