Loading lib/rp.js +18 −7 Original line number Diff line number Diff line Loading @@ -49,10 +49,6 @@ var originalInit = request.Request.prototype.init; request.Request.prototype.init = function (options) { if (_.isString(options.method)) { options.method = options.method.toUpperCase(); } var self = this; self._rp_promise = new Bluebird(function (resolve, reject) { Loading @@ -65,10 +61,25 @@ request.Request.prototype.init = function (options) { self._rp_callbackOrig = self.callback; self.callback = ownCallback; if (_.isPlainObject(options)) { if (_.isString(options.method)) { options.method = options.method.toUpperCase(); } self._rp_options = options; self._rp_options.simple = options.simple === false ? false : true; self._rp_options.resolveWithFullResponse = options.resolveWithFullResponse === true ? true : false; } else { self._rp_options = { simple: true, resolveWithFullResponse: false }; } return originalInit.apply(self, arguments); }; Loading Loading
lib/rp.js +18 −7 Original line number Diff line number Diff line Loading @@ -49,10 +49,6 @@ var originalInit = request.Request.prototype.init; request.Request.prototype.init = function (options) { if (_.isString(options.method)) { options.method = options.method.toUpperCase(); } var self = this; self._rp_promise = new Bluebird(function (resolve, reject) { Loading @@ -65,10 +61,25 @@ request.Request.prototype.init = function (options) { self._rp_callbackOrig = self.callback; self.callback = ownCallback; if (_.isPlainObject(options)) { if (_.isString(options.method)) { options.method = options.method.toUpperCase(); } self._rp_options = options; self._rp_options.simple = options.simple === false ? false : true; self._rp_options.resolveWithFullResponse = options.resolveWithFullResponse === true ? true : false; } else { self._rp_options = { simple: true, resolveWithFullResponse: false }; } return originalInit.apply(self, arguments); }; Loading