|
|
%!s(int64=3) %!d(string=hai) anos | |
|---|---|---|
| .. | ||
| index.js | %!s(int64=3) %!d(string=hai) anos | |
| license | %!s(int64=3) %!d(string=hai) anos | |
| package.json | %!s(int64=3) %!d(string=hai) anos | |
| readme.md | %!s(int64=3) %!d(string=hai) anos | |
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