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

good-guy-http

Package Overview
Dependencies
Maintainers
3
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

good-guy-http - npm Package Compare versions

Comparing version 1.12.0 to 1.12.1

9

lib/index.js

@@ -26,2 +26,3 @@ var _ = require('underscore');

errorLogger: console.error, // error logs will go to stderr
logTiming: false, // log timing info to the console

@@ -74,3 +75,3 @@ // if the server doesn't specify Cache-Control, default cache setup is caching for 5s

'requestLib',
'logTiming',
'mockTimer',

@@ -103,2 +104,6 @@ 'idempotent'

// Set up timing
if (config.logTiming)
reqConfig.time = true;
// sanitize configuration

@@ -126,3 +131,3 @@ if (config.cache === undefined)

// we obviously aren't allowed to retry POST's and other non-idempotent requests
var fetch = require('./promised-request')(request, Promise, _.pick(config, ['maxResponseSize']));
var fetch = require('./promised-request')(request, Promise, _.pick(config, ['maxResponseSize', 'logTiming']));
var fetchIdempotent = fetch, fetchNonIdempotent = fetch;

@@ -129,0 +134,0 @@ if (config.maxRetries)

@@ -30,2 +30,9 @@ var util = require('util');

var httpReq = request(requestOptions, function(err, response) {
if (config.logTiming) console.log('Timing: url: ' + response.request.uri.href
+ ' total: ' + response.timingPhases.total
+ ' wait: ' + response.timingPhases.wait
+ ' dns: ' + response.timingPhases.dns
+ ' tcp: ' + response.timingPhases.tcp
+ ' firstByte: ' + response.timingPhases.firstByte
+ ' download: ' + response.timingPhases.download);
// hard errors cause a promise rejection

@@ -32,0 +39,0 @@ if (err) {

{
"name": "good-guy-http",
"version": "1.12.0",
"version": "1.12.1",
"description": "The opinionated sane HTTP client with a good guy approach.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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