Socket
Socket
Sign inDemoInstall

reqlib

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reqlib - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

7

dist/index.js

@@ -69,2 +69,3 @@ "use strict";

HTTP_STATUS_CODES = {
NO_CONTENT: 204,
PROXY_REQUIRED: 305,

@@ -431,5 +432,6 @@ REDIRECT_CODE_PERM: 301,

error = state.statusCode >= DEFAULTS.HTTP_ERROR_CODE_THRESHHOLD,
retry = state.statusCode >= DEFAULTS.HTTP_ERROR_CODE_RETRY_THRESHHOLD && state.tries <= options.maxRetryCount;
retry = state.statusCode >= DEFAULTS.HTTP_ERROR_CODE_RETRY_THRESHHOLD && state.tries <= options.maxRetryCount,
statusCode = response.statusCode;
if (json) {
if (json && statusCode !== HTTP_STATUS_CODES.NO_CONTENT && body.length) {
try {

@@ -466,2 +468,3 @@ body = JSON.parse(body);

_err5.state = state;
_err5.statusCode = statusCode;
return reject(_err5);

@@ -468,0 +471,0 @@ }

@@ -0,1 +1,6 @@

# v1.0.6 - 03/05/2019
* Added statusCode property from response to error when available
* Fixed issue where 204 (no content) or an empty body caused parsing to fail
# v1.0.5 - 02/28/2019

@@ -2,0 +7,0 @@

{
"name": "reqlib",
"version": "1.0.5",
"version": "1.0.6",
"description": "A library to simplify REST API requests and to provide utilities for handling common REST API consumer scenarios ",

@@ -5,0 +5,0 @@ "main": "dist",

Sorry, the diff of this file is not supported yet

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