svb-client
Advanced tools
Comparing version 2.4.4 to 2.4.5
@@ -95,7 +95,7 @@ // | ||
patch: function(path, postdata, callback) { | ||
this.post(path, postdata, callback, 'PATCH'); | ||
patch: function(path, postdata, callback, addQuery) { | ||
this.post(path, postdata, callback, 'PATCH', addQuery); | ||
}, | ||
post: function(path, postdata, callback, overrideMethod) { | ||
post: function(path, postdata, callback, overrideMethod, addQuery) { | ||
if (typeof postdata === 'string') { | ||
@@ -107,2 +107,5 @@ postdata = JSON.parse(postdata); | ||
} | ||
if (!addQuery) { | ||
addQuery = ''; | ||
} | ||
if (!postdata.data && Object.keys(postdata).length > 0) { | ||
@@ -113,3 +116,6 @@ // send data inside of a data wrapper | ||
let stringedpost = JSON.stringify(postdata); | ||
let headers = this._getHeaders(overrideMethod, path, "", stringedpost); | ||
let headers = this._getHeaders(overrideMethod, path, addQuery, stringedpost); | ||
if (addQuery.length) { | ||
path += '?' + addQuery; | ||
} | ||
@@ -116,0 +122,0 @@ request({ |
{ | ||
"name": "svb-client", | ||
"version": "2.4.4", | ||
"version": "2.4.5", | ||
"description": "NodeJS request client for SVB API", | ||
@@ -5,0 +5,0 @@ "main": "client.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
5254
150
0