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

tinyreq

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tinyreq - npm Package Compare versions

Comparing version 3.2.6 to 3.3.0

17

lib/index.js

@@ -11,3 +11,4 @@ "use strict";

assured = require("assured"),
noop = require("noop6");
noop = require("noop6"),
zlib = require("zlib");

@@ -74,8 +75,16 @@ /**

var request = (options.protocol === "http:" ? http : https).request(options, function (res) {
options.encoding && res.setEncoding(options.encoding);
var body = [],
bodyLength = 0;
var isGzipped = res.headers["content-encoding"] === "gzip";
var resStream = res;
if (isGzipped) {
resStream = res.pipe(zlib.createGunzip());
} else {
options.encoding && res.setEncoding(options.encoding);
}
if (typeof callback === "function") {
res.on("data", function (data) {
resStream.on("data", function (data) {
body.push(data);

@@ -86,3 +95,3 @@ bodyLength += data.length;

res.on("data", function (data) {
resStream.on("data", function (data) {
str.emit("data", data);

@@ -89,0 +98,0 @@ }).on("error", function (e) {

{
"name": "tinyreq",
"version": "3.2.6",
"version": "3.3.0",
"description": "Tiny library for making http(s) requests.",

@@ -57,2 +57,2 @@ "main": "lib/index.js",

]
}
}

@@ -55,5 +55,7 @@ <!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->

2. For bug reports and feature requests, open issues. :bug:
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
## :memo: Documentation

@@ -112,4 +114,6 @@

- [`lwipify`](https://github.com/IonicaBizau/lwipify#readme)—Convert images in lwip objects.
- [`medivia-api`](https://github.com/ethkat/medivia-nodejs-api#readme) (by Ethaan)—Medivia.org NodeJS API
- [`mun`](https://github.com/theuves/mun#readme) (by Matheus Alves)—Obter informações de municípios do brasileiros.
- [`page-changed`](https://github.com/IonicaBizau/node-page-changed)—Call a function when the page body is changed.
- [`payiota`](https://github.com/arizona2014/node-payiota#readme) (by Andy Lisac)—A Node.js wrapper around the Payiota.me API.
- [`tibia-api`](https://github.com/Ethaan/nodejs-tibia-api#readme) (by Ethaan)—NodeJS Tibia.com API

@@ -116,0 +120,0 @@ - [`tinyreq-cli`](https://github.com/IonicaBizau/tinyreq-cli#readme)—A cli tool for making http(s) requests. CLI for tinyreq.

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