Socket
Socket
Sign inDemoInstall

got

Package Overview
Dependencies
Maintainers
2
Versions
176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

got - npm Package Compare versions

Comparing version 2.3.2 to 2.4.0

5

index.js

@@ -14,2 +14,3 @@ 'use strict';

var lowercaseKeys = require('lowercase-keys');
var status = require('statuses');

@@ -69,3 +70,3 @@ function got(url, opts, cb) {

// redirect
if (statusCode >= 300 && statusCode < 400 && 'location' in res.headers) {
if (status.redirect[statusCode] && 'location' in res.headers) {
res.resume(); // Discard response

@@ -90,3 +91,3 @@

read(res, encoding, function (error, data) {
var err = error || new Error('Couldn\'t connect to ' + url + '.');
var err = error || new Error(url + ' response code is ' + statusCode + ' (' + status[statusCode] + ')');
err.code = statusCode;

@@ -93,0 +94,0 @@ cb(err, data, response);

3

package.json
{
"name": "got",
"version": "2.3.2",
"version": "2.4.0",
"description": "Simplified HTTP/HTTPS requests",

@@ -48,2 +48,3 @@ "license": "MIT",

"read-all-stream": "^1.0.0",
"statuses": "^1.2.1",
"timed-out": "^2.0.0"

@@ -50,0 +51,0 @@ },

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