New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

svb-client

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

svb-client - npm Package Compare versions

Comparing version 2.3.2 to 2.4.2

27

client.js

@@ -57,7 +57,15 @@ //

get: function(path, query, callback) {
let headers = this._getHeaders("GET", path, query, "");
delete: function(path, callback) {
this.get(path, '', callback, 'DELETE');
},
get: function(path, query, callback, overrideMethod) {
if (!overrideMethod) {
overrideMethod = 'GET';
}
let headers = this._getHeaders(overrideMethod, path, query, "");
request({
uri: this.baseurl + path + '?' + query,
url: this.baseurl + path + '?' + query,
method: overrideMethod,
headers: headers

@@ -78,6 +86,13 @@ }, (err, response, body) => {

post: function(path, postdata, callback) {
patch: function(path, postdata, callback) {
this.post(path, postdata, callback, 'PATCH');
},
post: function(path, postdata, callback, overrideMethod) {
if (typeof postdata === 'string') {
postdata = JSON.parse(postdata);
}
if (!overrideMethod) {
overrideMethod = 'POST';
}
if (!postdata.data && Object.keys(postdata).length > 0) {

@@ -88,7 +103,7 @@ // send data inside of a data wrapper

let stringedpost = JSON.stringify(postdata);
let headers = this._getHeaders("POST", path, "", stringedpost);
let headers = this._getHeaders(overrideMethod, path, "", stringedpost);
request({
url: this.baseurl + path,
method: 'POST',
method: overrideMethod,
headers: headers,

@@ -95,0 +110,0 @@ json: postdata

{
"name": "svb-client",
"version": "2.3.2",
"version": "2.4.2",
"description": "NodeJS request client for SVB API",

@@ -5,0 +5,0 @@ "main": "client.js",

@@ -34,2 +34,6 @@ ## svb-client

// similar
client.patch(url, jsondata, callback);
client.delete(url, callback);
// uploading a file

@@ -36,0 +40,0 @@ const fs = require('fs');

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