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

cuddle

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cuddle - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

33

index.js

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

this._running++;
return req.start();

@@ -123,2 +124,3 @@ }

const req = this._requests_queue.shift();
return req.start();

@@ -142,3 +144,2 @@ }

this.headers = {};
this.callbacks = {};
this.request_opts = {};

@@ -149,3 +150,2 @@ this.retries = 0;

this.follow = false;
this.started = false;
this.encoding = 'utf8';

@@ -200,2 +200,3 @@ this.logger = console;

this._max_retry = max;
return this;

@@ -207,2 +208,3 @@ }

this._retryables = retryables;
return this;

@@ -215,2 +217,3 @@ }

this.headers[key] = value;
return this;

@@ -222,2 +225,3 @@ }

this.headers[key] = value;
return this;

@@ -229,2 +233,3 @@ }

this.request_opts[key] = value;
return this;

@@ -258,2 +263,3 @@ }

this.additional_arguments = arguments;
return this;

@@ -264,2 +270,3 @@ }

this.encoding = encoding;
return this;

@@ -271,2 +278,3 @@ }

this.follow = true;
return this;

@@ -277,2 +285,3 @@ }

this.auto_format = fmt;
return this;

@@ -283,2 +292,3 @@ }

this.logger = logger;
return this;

@@ -289,2 +299,3 @@ }

this.is_verbose = true;
return this;

@@ -338,2 +349,3 @@ }

this.data = data || '';
return this;

@@ -442,11 +454,2 @@ }

response.on('close', () => {
this.log('error', 'Response closed');
this.last_error = {
response: 'Response closed',
code: 500
};
this.retry();
});
response.on('error', err => {

@@ -483,2 +486,3 @@ this.log('error', 'Response error', err);

this.log('error', 'JSON is invalid');
return this.cb(e, this.raw, this, this.additional_arguments);

@@ -533,3 +537,5 @@ }

for (temp in this.headers) {
redir.set_header(temp, this.headers[temp]);
if (this.headers.hasOwnProperty(temp)) {
redir.set_header(temp, this.headers[temp]);
}
}

@@ -561,2 +567,3 @@

this.last_error = err;
return this.retry();

@@ -586,3 +593,3 @@ }

return new Request('POST');
}
}

@@ -589,0 +596,0 @@ static get put () {

{
"name": "cuddle",
"version": "1.3.3",
"version": "1.3.4",
"description": "Cuddle is a minimal, chainable and readability first http client",

@@ -43,6 +43,7 @@ "main": "index.js",

"babel-preset-es2015": "^6.24.1",
"eslint-plugin-json": "^1.3.2",
"grunt": "^1.0.1",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-rollup": "^2.0.1",
"gruntify-eslint": "^5.0.0",
"mocha": "^3.5.0",

@@ -49,0 +50,0 @@ "nock": "^9.0.14",

@@ -99,5 +99,5 @@ # Cuddle

.args(user)
//.max_retry(10) // default is 3
//.debug() // if you want to log all
//.logger(winston) // if you want to replace the logger (console)
//.max_retry(10) // to set the number of retries
//.debug() // to log all
//.logger(winston) // to replace the logger (default is console)
.then(bar);

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