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

bagofholding

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bagofholding - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

5

CHANGELOG.md

@@ -1,2 +0,5 @@

### 0.1.4-pre
### 0.1.5-pre
* Add http#req timeout handling, default timeout changed to 2000 milliseconds
### 0.1.4
* Add http#req headers, payload (body, form, json, multipart), and requestOpts handling

@@ -3,0 +6,0 @@

9

lib/http.js

@@ -0,1 +1,2 @@

/*jshint esnext: true */
var request = require('request');

@@ -17,2 +18,3 @@

* - body, form, json, multipart: request payload, exact map to mikeal/request module body, form, json, multipart opts
* - timeout: request timeout in milliseconds, default to 2000 milliseconds
* - requestOpts: mikeal/request module opts, these opts will override any params set by http#req

@@ -24,4 +26,5 @@ * @param {Function} cb: standard cb(err, result) callback

// init default settings with follow redirections on all methods, and 1 minute timeout
var params = { url: url, followAllRedirects: true, timeout: 60000 },
const TIMEOUT = 2000;
// init default settings with follow redirections on all methods, and 2 seconds timeout
var params = { url: url, followAllRedirects: true, timeout: opts.timeout || TIMEOUT },
envProxy = proxy(url);

@@ -114,2 +117,2 @@

exports.request = req;
exports.proxy = proxy;
exports.proxy = proxy;

@@ -5,3 +5,3 @@ {

"keywords": [],
"version": "0.1.4",
"version": "0.1.5",
"homepage": "http://github.com/cliffano/bagofholding",

@@ -8,0 +8,0 @@ "author": "Cliffano Subagio <blah@cliffano.com> (http://blog.cliffano.com)",

@@ -25,2 +25,5 @@ Bag Of Holding [![Build Status](https://secure.travis-ci.org/cliffano/bagofholding.png?branch=master)](http://travis-ci.org/cliffano/bagofholding) [![Dependencies Status](https://david-dm.org/cliffano/bagofholding.png)](http://david-dm.org/cliffano/bagofholding)

var bag = require('bagofholding');
bag.http.req
bag.cli.*;

@@ -27,0 +30,0 @@ bag.http.*;

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