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

@f5devcentral/atg-shared-utilities

Package Overview
Dependencies
Maintainers
19
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@f5devcentral/atg-shared-utilities - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

4

CHANGELOG.md

@@ -15,2 +15,6 @@ # Changelog

## [0.10.0] - 2023-07-17
### Added
- Added `rejectErrStatusCodes` option to `requestUtils.send`
## [0.9.0] - 2023-07-11

@@ -17,0 +21,0 @@ ### Added

2

package.json
{
"name": "@f5devcentral/atg-shared-utilities",
"version": "0.9.0",
"version": "0.10.0",
"scripts": {

@@ -5,0 +5,0 @@ "lint": "eslint .",

@@ -43,2 +43,4 @@ /**

* @param {boolean} [options.returnResponseObj] - If true, returns the response object instead of just the body
* @param {boolean} [options.rejectErrStatusCodes=true] - If true, rejects the promise when a response with a
* 400+ status code is received. Defaults to true
* @returns {Promise} Promise object that resolves with either the response body or the response object depending on

@@ -49,3 +51,6 @@ * the options that are provided

const reqOpts = JSON.parse(JSON.stringify(requestOptions));
const opts = options || {};
const defaultOptions = {
rejectErrStatusCodes: true
};
const opts = Object.assign(defaultOptions, options);
let protocol = https;

@@ -107,3 +112,3 @@ let jsonBody;

if (response.statusCode >= 400) {
if (response.statusCode >= 400 && opts.rejectErrStatusCodes) {
if (DEBUG) {

@@ -110,0 +115,0 @@ console.error(response.statusCode, buffer);

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