files.com 1.0.201 → 1.0.202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.201
1
+ 1.0.202
package/lib/Api.js CHANGED
@@ -206,6 +206,7 @@ var Api = /*#__PURE__*/(0, _createClass2.default)(function Api() {
206
206
  requestPath,
207
207
  hasParams,
208
208
  pairs,
209
+ updatedOptions,
209
210
  response,
210
211
  _args3 = arguments;
211
212
  return _regenerator.default.wrap(function _callee3$(_context3) {
@@ -278,8 +279,6 @@ var Api = /*#__PURE__*/(0, _createClass2.default)(function Api() {
278
279
  }
279
280
  }
280
281
 
281
- options.headers = headers;
282
-
283
282
  if (_Files.default.shouldDebugRequest()) {
284
283
  _Logger.default.debug('Request Options:');
285
284
 
@@ -291,12 +290,15 @@ var Api = /*#__PURE__*/(0, _createClass2.default)(function Api() {
291
290
  }));
292
291
  }
293
292
 
293
+ updatedOptions = _objectSpread(_objectSpread({}, options), {}, {
294
+ headers: headers
295
+ });
294
296
  _context3.next = 24;
295
- return Api._sendVerbatim(requestPath, verb, options);
297
+ return Api._sendVerbatim(requestPath, verb, updatedOptions);
296
298
 
297
299
  case 24:
298
300
  response = _context3.sent;
299
- return _context3.abrupt("return", Api._autoPaginate(path, verb, params, options, response, metadata));
301
+ return _context3.abrupt("return", Api._autoPaginate(path, verb, params, updatedOptions, response, metadata));
300
302
 
301
303
  case 26:
302
304
  case "end":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.201",
3
+ "version": "1.0.202",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Api.js CHANGED
@@ -159,8 +159,6 @@ class Api {
159
159
  }
160
160
  }
161
161
 
162
- options.headers = headers
163
-
164
162
  if (Files.shouldDebugRequest()) {
165
163
  Logger.debug('Request Options:')
166
164
  Logger.debug({
@@ -175,9 +173,14 @@ class Api {
175
173
  })
176
174
  }
177
175
 
178
- const response = await Api._sendVerbatim(requestPath, verb, options)
176
+ const updatedOptions = {
177
+ ...options,
178
+ headers,
179
+ }
180
+
181
+ const response = await Api._sendVerbatim(requestPath, verb, updatedOptions)
179
182
 
180
- return Api._autoPaginate(path, verb, params, options, response, metadata)
183
+ return Api._autoPaginate(path, verb, params, updatedOptions, response, metadata)
181
184
  }
182
185
  }
183
186