Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

decompress-response

Package Overview
Dependencies
1
Maintainers
1
Versions
11
Issues
File Explorer

Advanced tools

decompress-response

Decompress a HTTP response if needed

    8.0.0latest

Version published
Maintainers
1
Weekly downloads
18,409,262
decreased by-4.14%

Weekly downloads

Changelog

Source

Breaking

  • Require Node.js 12.20 2436048
  • This package is now pure ESM. Please read this.

Fixes

  • Preserve content-encoding header if the respose is passed through b35646b

https://github.com/sindresorhus/decompress-response/compare/v7.0.0...v8.0.0

Readme

Source

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.


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

What is decompress-response?

Decompress a HTTP response if needed

Is decompress-response popular?

The npm package decompress-response receives a total of 14,986,471 weekly downloads. As such, decompress-response popularity was classified as popular.

Is decompress-response well maintained?

We found that decompress-response demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 27 Oct 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc