Socket
Socket
Sign inDemoInstall

got

Package Overview
Dependencies
Maintainers
3
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 5.3.2 to 5.4.0

6

index.js
'use strict';
var EventEmitter = require('events').EventEmitter;

@@ -22,2 +23,3 @@ var http = require('http');

var parseJson = require('parse-json');
var isRetryAllowed = require('is-retry-allowed');

@@ -275,4 +277,4 @@ function requestAsEventEmitter(opts) {

var retries = opts.retries;
opts.retries = function backoff(iter) {
if (iter > retries) {
opts.retries = function backoff(iter, err) {
if (iter > retries || !isRetryAllowed(err)) {
return 0;

@@ -279,0 +281,0 @@ }

{
"name": "got",
"version": "5.3.2",
"version": "5.4.0",
"description": "Simplified HTTP/HTTPS requests",

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

"is-redirect": "^1.0.0",
"is-retry-allowed": "^1.0.0",
"is-stream": "^1.0.0",

@@ -54,0 +55,0 @@ "lowercase-keys": "^1.0.0",

@@ -126,2 +126,4 @@ <h1 align="center">

**Note:** `ENOTFOUND` and `ENETUNREACH` error will not be retried (see full list in [`is-retry-allowed`](https://github.com/floatdrop/is-retry-allowed/blob/master/index.js#L12) module).
Option accepts `function` with `retry` and `error` arguments. Function must return delay in milliseconds (`0` return value cancels retry).

@@ -128,0 +130,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