Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fuel-rest

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fuel-rest - npm Package Compare versions

Comparing version 3.0.4 to 3.1.0

19

lib/fuel-rest.js

@@ -15,2 +15,3 @@ /*

const clone = require('lodash.clone');
const merge = require('lodash.merge');
const isPlainObject = require('lodash.isplainobject');

@@ -49,2 +50,3 @@

);
this.globalReqOptions = options.globalReqOptions || {};
}

@@ -78,3 +80,10 @@ /**

_processRequest(options, callback) {
this.AuthClient.getAccessToken(clone(options.auth))
const requestOptions = merge(
{},
this.globalReqOptions,
options.auth
);
this.AuthClient.getAccessToken(requestOptions)
.then(tokenInfo => {

@@ -115,4 +124,8 @@ if (!tokenInfo.accessToken) {

_makeRequest(consolidatedOpts, callback) {
const requestOptions = consolidatedOpts.req;
const requestOptions = merge(
{},
this.globalReqOptions,
consolidatedOpts.req
);
request(requestOptions, (err, res, body) => {

@@ -119,0 +132,0 @@ let parsedBody;

7

package.json
{
"name": "fuel-rest",
"version": "3.0.4",
"version": "3.1.0",
"description": "Node library for performing REST API calls to Salesforce Marketing Cloud (formerly ExactTarget).",

@@ -35,7 +35,8 @@ "main": "./lib/fuel-rest.js",

"dependencies": {
"fuel-auth": "^3.0.2",
"fuel-auth": "3.1.0",
"lodash.clone": "~4.5.0",
"lodash.isplainobject": "~4.0.4",
"request": "~2.87.0"
"lodash.merge": "^4.6.1",
"request": "~2.88.0"
}
}

@@ -38,2 +38,6 @@ Fuel REST Client (for Node.js) [![Build Status](https://travis-ci.org/salesforce-marketingcloud/FuelSDK-Node-REST.svg?branch=master)](https://travis-ci.org/salesforce-marketingcloud/FuelSDK-Node-REST) [![Greenkeeper badge](https://badges.greenkeeper.io/salesforce-marketingcloud/FuelSDK-Node-REST.svg)](https://greenkeeper.io/)

* set headers that apply to all REST requests (not auth requests)
* `options.globalReqOptions`
* Required: no
* Type: `Object`
* set configuration options that apply to all requests (auth + REST)

@@ -40,0 +44,0 @@ ## API

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