From 70cafabcab077b1c2b92115d8ef21e297c443c0b Mon Sep 17 00:00:00 2001 From: simov Date: Mon, 9 May 2016 10:54:27 +0300 Subject: [PATCH] Move aws4 require statement to the top --- request.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/request.js b/request.js index 124157e86..178a268da 100644 --- a/request.js +++ b/request.js @@ -9,6 +9,7 @@ var http = require('http') , bl = require('bl') , hawk = require('hawk') , aws2 = require('aws-sign2') + , aws4 = require('aws4') , httpSignature = require('http-signature') , mime = require('mime-types') , stringstream = require('stringstream') @@ -1264,10 +1265,9 @@ Request.prototype.aws = function (opts, now) { self._aws = opts return self } - + if (opts.sign_version == 4 || opts.sign_version == '4') { - var aws4 = require('aws4') - // use aws4 + // use aws4 var options = { host: self.uri.host, path: self.uri.path,