Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

decompress-response

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decompress-response

Decompress a HTTP response if needed

  • 9.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is decompress-response?

The decompress-response npm package is used to decompress HTTP responses that are compressed. This is useful when making HTTP requests and the server responds with compressed data, such as gzip or deflate. The package automatically detects the encoding and decompresses the response so that it can be easily processed in its uncompressed form.

What are decompress-response's main functionalities?

Decompressing HTTP responses

This code sample demonstrates how to use decompress-response to decompress an HTTP response. The 'http.get' method is used to make a GET request to a server. The response is then passed through the decompressResponse function, which returns a stream with the decompressed response. Finally, the decompressed data is piped to the standard output.

const http = require('http');
const decompressResponse = require('decompress-response');

http.get('http://example.com', (res) => {
  res = decompressResponse(res);
  res.pipe(process.stdout);
});

Other packages similar to decompress-response

Keywords

FAQs

Package last updated on 28 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc