Vinícius Ernani de Carvalho 6c4544a079 Create the backend | 5 years ago | |
---|---|---|
.. | ||
index.js | 5 years ago | |
license | 5 years ago | |
package.json | 5 years ago | |
readme.md | 5 years ago |
Unzip a HTTP response if needed
Unzips the response from http.request
if it's gzipped/deflated, otherwise just passes it through.
$ npm install --save unzip-response
const http = require('http');
const unzipResponse = require('unzip-response');
http.get('http://sindresorhus.com', res => {
res = unzipResponse(res);
});
MIT © Sindre Sorhus