
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
simple-rest-client
Advanced tools
This is a rest client that works for node.js v0.4.8 and up. It's a fairly straightforward wrapper; for something complicated, the http configuration can be easily manipulated.
Just instantiate a new client and configure it:
var REST = require('simple-rest-client');
var client = new REST.SimpleRestClient();
var config = {
host: 'my.url.net',
version: '/v1.0',
port: '80',
username: 'username',
password: 'password',
contentType: 'application/x-www-form-urlencoded'
};
client.setOptions(config);
Add url segments, and GET or POST parameters to the request (pass in null if there aren't any):
var segments = [];
segments.push('foo');
segments.push('bar');
var getParams = {};
getParams['key'] = 'value';
client.get(segments, getParams, function (response) {
client.showResponse(response);
});
var segments = [];
segments.push('foo');
segments.push('bar');
var getParams = {};
getParams['key'] = 'value';
var postParams = {};
postParams['key'] = 'value';
client.post(segments, getParams, postParams, function (response) {
client.showResponse(response);
});
To POST to the body:
postParams['body'] = 'value';
var segments = [];
segments.push('foo');
segments.push('bar');
var getParams = {};
getParams['key'] = 'value';
var postParams = {};
postParams['key'] = 'value';
client.del(segments, getParams, postParams, function (response) {
client.showResponse(response);
});
FAQs
Simple HTTP wrapper for creating REST applications
The npm package simple-rest-client receives a total of 2 weekly downloads. As such, simple-rest-client popularity was classified as not popular.
We found that simple-rest-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.