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.2.2 to 2.3.2

26

client.js

@@ -105,2 +105,28 @@ //

});
},
upload: function(path, readstream, callback) {
let stringedpost = readstream.read();
let headers = this._getHeaders("POST", path, "", stringedpost);
headers['Content-Type'] = 'multipart/form-data';
request({
url: this.baseurl + path,
method: 'POST',
headers: headers,
formData: {
file: readstream
}
}, (err, response, body) => {
if (err) {
return callback(err);
}
if (typeof body === 'string') {
body = JSON.parse(body);
}
if (body.error || body.fault) {
return callback(body.error || body.fault, null);
}
callback(null, body);
});
}

@@ -107,0 +133,0 @@ };

2

package.json
{
"name": "svb-client",
"version": "2.2.2",
"version": "2.3.2",
"description": "NodeJS request client for SVB API",

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

## svb-client
For NodeJS
NodeJS library which helps you make GET and POST requests to the SVB API.

@@ -14,5 +14,5 @@ ## Installation

```javascript
const SVBRequest = require('svb-client');
const SVB = require('svb-client');
let req = new SVBRequest({
let client = new SVB({
API_KEY: '',

@@ -26,9 +26,16 @@ HMAC_SECRET: '',

});
req.get('/v1', 'test=1', (err, data) => {
client.get('/v1', 'test=1', (err, data) => {
...
});
req.post('/v1', { "data": "foo" }, (err, data) => {
client.post('/v1', { "data": "foo" }, (err, data) => {
...
});
// uploading a file
const fs = require('fs');
client.upload('/v1/files', fs.createReadStream(__dirname + '/file.png'), (err, data) => {
...
});
```
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