Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
index.js | D | 12-May-2024 | 860 | 37 | 28 | |
license | D | 12-May-2024 | 1.1 KiB | 22 | 17 | |
package.json | D | 12-May-2024 | 1.8 KiB | 82 | 81 | |
readme.md | D | 12-May-2024 | 661 | 30 | 17 |
readme.md
1# unzip-response [![Build Status](https://travis-ci.org/sindresorhus/unzip-response.svg?branch=master)](https://travis-ci.org/sindresorhus/unzip-response) 2 3> Unzip a HTTP response if needed 4 5Unzips the response from [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) if it's gzipped/deflated, otherwise just passes it through. 6 7 8## Install 9 10``` 11$ npm install --save unzip-response 12``` 13 14 15## Usage 16 17```js 18const http = require('http'); 19const unzipResponse = require('unzip-response'); 20 21http.get('http://sindresorhus.com', res => { 22 res = unzipResponse(res); 23}); 24``` 25 26 27## License 28 29MIT © [Sindre Sorhus](https://sindresorhus.com) 30