From 5bf3471d65acd8596e92766d63f14c74bfec2a06 Mon Sep 17 00:00:00 2001 From: Will Mitchell Date: Wed, 7 May 2014 20:39:36 -0400 Subject: [PATCH 1/2] HTTP Auth --- lib/unio.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/unio.js b/lib/unio.js index c034fd7..bb2fc77 100644 --- a/lib/unio.js +++ b/lib/unio.js @@ -255,6 +255,13 @@ Unio.prototype.buildRequestOpts = function (verb, resource, specResource, params return '/' + paramVal }) + // encode http auth params (if specified) and strip from `paramsClone` + if (paramsClone.httpAuth) { + var httpAuthClone = helper.clone(paramsClone.httpAuth) + reqOpts.auth = paramsClone.httpAuth; + delete paramsClone.httpAuth; + } + // encode the oauth params (if specified) and strip from `paramsClone` if (paramsClone.oauth) { // handle oauth info from params From 2d2a034a80b282a79e4c08ef8ba6467380eec3d0 Mon Sep 17 00:00:00 2001 From: Will Mitchell Date: Wed, 7 May 2014 20:57:28 -0400 Subject: [PATCH 2/2] No semicolons --- lib/unio.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/unio.js b/lib/unio.js index bb2fc77..0dee944 100644 --- a/lib/unio.js +++ b/lib/unio.js @@ -258,8 +258,9 @@ Unio.prototype.buildRequestOpts = function (verb, resource, specResource, params // encode http auth params (if specified) and strip from `paramsClone` if (paramsClone.httpAuth) { var httpAuthClone = helper.clone(paramsClone.httpAuth) - reqOpts.auth = paramsClone.httpAuth; - delete paramsClone.httpAuth; + reqOpts.auth = paramsClone.httpAuth + + delete paramsClone.httpAuth } // encode the oauth params (if specified) and strip from `paramsClone`