decompress-response
Decompress a HTTP response if needed
Last updated 5 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install decompress-response 
SYNC missed versions from official npm registry.

decompress-response

Decompress a HTTP response if needed

Decompresses the response from http.request if it's gzipped, deflated or compressed with Brotli, otherwise just passes it through.

Used by got.

Install

npm install decompress-response

Usage

import http from 'node:http';
import decompressResponse from 'decompress-response';

http.get('https://sindresorhus.com', response => {
	response = decompressResponse(response);
});

API

decompressResponse(response)

Returns the decompressed HTTP response stream.

response

Type: http.IncomingMessage

The HTTP incoming stream with compressed data.

Current Tags

  • 9.0.0                                ...           latest (6 months ago)

13 Versions

  • 9.0.0                                ...           6 months ago
  • 8.1.0                                ...           2 years ago
  • 8.0.0                                ...           3 years ago
  • 7.0.0                                ...           4 years ago
  • 6.0.0                                ...           5 years ago
  • 5.0.0                                ...           5 years ago
  • 4.2.1                                ...           5 years ago
  • 4.2.0                                ...           6 years ago
  • 4.1.0                                ...           6 years ago
  • 4.0.0                                ...           6 years ago
  • 3.3.0                                ...           7 years ago
  • 3.2.0                                ...           8 years ago
  • 3.1.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 10
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (6)
Dependents (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE