Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Node library for performing REST API calls to Salesforce Marketing Cloud (formerly ExactTarget).
This repo used to be located at https://github.com/exacttarget/Fuel-Node-REST
This library allows users access to the Salesforce Marketing Cloud (formerly ExactTarget) REST API at a low level.
npm install fuel-rest --save
new FuelRest(options) - Initialization
options.auth
Object
or FuelAuth Instanceoptions.origin
or options.restEndpoint
String
options.headers
Object
options
- see request modules optionsoptions.auth
- will be passed into getAccessToken inside Fuel Authoptions.uri
- can either be a full url or a path that is appended to options.origin
used at initialization (url.resolve)options.retry
- boolean value representing whether or not to retry request (and request new token) on 401 invalid token response. default: false
callback
- executed after task is completed.
options
- see apiRequest optionsoptions.retry
- see above for description. default: true
callback
- see apiRequest options###Callbacks v. Promises
While future versions will disallow using callbacks and promises together, at the moment it is possible to do. This will lead to unexpected behavior, and you should only one; callbacks OR promises.
var FuelRest = require('fuel-rest');
var options = {
auth: {
// options you want passed when Fuel Auth is initialized
clientId: 'clientId'
, clientSecret: 'clientSecret'
}
, origin: 'https://alternate.rest.endpoint.com' // default --> https://www.exacttargetapis.com
};
var RestClient = new FuelRest(options);
var options = {
uri: '/platform/v1/endpoints',
headers: {}
// other request options
};
RestClient.get(options, function(err, response) {
if(err) {
// error here
console.log(err);
}
// will be delivered with 200, 400, 401, 500, etc status codes
// response.body === payload from response
// response.res === full response from request client
console.log(response);
});
// or with promises
RestClient
.get(options)
.then(function(response) {
// will be delivered with 200, 400, 401, 500, etc status codes
// response.body === payload from response
// response.res === full response from request client
console.log(response);
})
.catch(function(err) {
// error here
console.log(err);
});
});
We welcome all contributions and issues! There's only one way to make this better, and that's by using it. If you would like to contribute, please checkout our guidelines!
FAQs
Node library for performing REST API calls to Salesforce Marketing Cloud (formerly ExactTarget).
The npm package fuel-rest receives a total of 1,965 weekly downloads. As such, fuel-rest popularity was classified as popular.
We found that fuel-rest 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.