summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/unzip-response/readme.md
blob: 87a62c4b3dfefeea39373fd2cec98811f6deb940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# unzip-response [![Build Status](https://travis-ci.org/sindresorhus/unzip-response.svg?branch=master)](https://travis-ci.org/sindresorhus/unzip-response)

> Unzip a HTTP response if needed

Unzips 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.


## Install

```
$ npm install --save unzip-response
```


## Usage

```js
const http = require('http');
const unzipResponse = require('unzip-response');

http.get('http://sindresorhus.com', res => {
	res = unzipResponse(res);
});
```


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)