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

caccl-send-request

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caccl-send-request - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

14

index.js
const axios = require('axios');
const qs = require('qs');
const CACCLError = require('caccl-error');
const https = require('https');
const errorCodes = require('./errorCodes');
// Create an agent to ignore unauthorize ssl issues
const ignoreSSLIssuesAgent = new https.Agent({ rejectUnauthorized: false });
/**

@@ -16,2 +20,4 @@ * Sends and retries an http request

* fails
* @param {boolean} [ignoreSSLIssues=false] - if true, ignores SSL certificate
* issues
* @return {Promise.<CACCLErrror|object>} Returns { body, status, headers } on

@@ -46,2 +52,9 @@ * success, CACCLError on failure

// Prep to ignore ssl issues
const httpsAgent = (
options.ignoreSSLIssues
? ignoreSSLIssuesAgent
: undefined
);
// Send request

@@ -52,2 +65,3 @@ return axios({

data,
httpsAgent,
headers: {

@@ -54,0 +68,0 @@ 'Content-Type': 'application/x-www-form-urlencoded',

3

package.json
{
"name": "caccl-send-request",
"version": "1.0.1",
"version": "1.0.2",
"description": "The default request sender used throughout the CACCL project.",

@@ -37,4 +37,5 @@ "main": "index.js",

"caccl-error": "^1.0.0",
"https": "^1.0.0",
"qs": "^6.5.2"
}
}
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