@@ -104,7 +107,7 @@ request.Request.prototype.init = function RP$initInterceptor(options) {
self._rp_callbackOrig=self.callback;
self._rp_callbackOrig=self.callback;
self.callback=RP$callback;
self.callback=RP$callback;
if (_.isString(options.method)){
if (isString(options.method)){
options.method=options.method.toUpperCase();
options.method=options.method.toUpperCase();
}
}
@@ -128,7 +131,7 @@ function expose(methodToExpose, exposeAs) {
exposeAs=exposeAs||methodToExpose;
exposeAs=exposeAs||methodToExpose;
/* istanbul ignore if */
/* istanbul ignore if */
if (!_.isUndefined(request.Request.prototype[exposeAs])){
if (request.Request.prototype[exposeAs]!==undefined){
console.error(chalk.bold.bgRed('[Request-Promise] Unable to expose method "'+exposeAs+'". It is already implemented by Request. Please visit https://github.com/request/request-promise/wiki/Troubleshooting'));
console.error(chalk.bold.bgRed('[Request-Promise] Unable to expose method "'+exposeAs+'". It is already implemented by Request. Please visit https://github.com/request/request-promise/wiki/Troubleshooting'));