decompress-response
Decompress a HTTP response if needed
Last updated 6 months 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 9
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (6)
Dependents (3)

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