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

syntex-basic

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syntex-basic - npm Package Compare versions

Comparing version 1.0.0-b11 to 1.0.0-b12

26

core/request-manager.js

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

const http = require('http');
const http = require('http'), https = require('https');

@@ -14,9 +14,4 @@ module.exports = class RequestManager

if(options.method == null)
if(options.data != null && (options.data instanceof Object || Array.isArray(options.data)))
{
options.method = options.data != null ? 'POST' : 'GET';
}
if(options.data != null)
{
try

@@ -32,4 +27,9 @@ {

var request = http.request(url, options, (response) => {
if(options.method == null)
{
options.method = options.data != null ? 'POST' : 'GET';
}
var request = (url.includes('https://') ? https : http).request(url, options, (response) => {
let data = '';

@@ -66,2 +66,12 @@

console.log(url, options);
if(options.headers != null)
{
for(const x in options.headers)
{
request.setHeader(x, options.headers[x]);
}
}
if(options.data != null)

@@ -68,0 +78,0 @@ {

{
"name": "syntex-basic",
"version": "1.0.0-b11",
"version": "1.0.0-b12",
"description": "A basic module for development",

@@ -5,0 +5,0 @@ "main": "main.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