* Fix workflow * Trigger * [auto] Update compiled version * [auto] Commit modules * Push Windows changes * Fix * [auto] Update compiled version * Try removing cwd * [auto] Update compiled version * Try with path module * [auto] Update compiled version * Fix path * [auto] Update compiled version * Use raw path * [auto] Update compiled version * Other path * [auto] Update compiled version * Avoid @action/exec * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * Try with shelljs * [auto] Update compiled version * Fix my stupidity * Copy scripts to local dir * [auto] Update compiled version * Still use path * [auto] Update compiled version * Delete entrypoint.sh * [auto] Update compiled version * Make file executable * [auto] Update compiled version * Try using bash * [auto] Update compiled version
30 lines
661 B
Markdown
30 lines
661 B
Markdown
# unzip-response [](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)
|