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

earnshark-npm

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

earnshark-npm - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

42

index.js
var http = require('http');
const https = require('https');
var request = require('request');

@@ -7,26 +9,24 @@ exports.addNewSubscription = function(product_id, key, body) {

// Set the headers
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
// Configure the request
var options = {
hostname: 'https://app.earnshark.com',
// port: 80,
path: '/product/' + product_id + '/addsubscriptionfromapi?key='+ key,
url: url,
method: 'POST',
headers: {
'Content-Type': 'application/json',
headers: headers,
form: body
}
// Start the request
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
};
var req = http.request(options, function(res) {
console.log('Status: ' + res.statusCode);
console.log('Headers: ' + JSON.stringify(res.headers));
res.setEncoding('utf8');
res.on('data', function (body) {
console.log('Body: ' + body);
});
});
req.on('error', function(e) {
console.log('problem with request: ' + e.message);
});
// write data to request body
req.write('{"string": "Hello, World"}');
req.end();
})
}

@@ -33,0 +33,0 @@

{
"name": "earnshark-npm",
"version": "1.0.9",
"version": "1.0.10",
"description": "This is the earnshark npm",

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