proxy-client
Advanced tools
Comparing version 0.2.4 to 0.3.0
@@ -37,3 +37,3 @@ /*! | ||
this._authorization = null; | ||
this.headers = util._extend(this.headers || {}, options.headers); | ||
} | ||
@@ -57,3 +57,10 @@ ProxyClient.extend = mi.extend; | ||
var child = this.constructor.createClient(this); | ||
child._authorization = options.auth; | ||
if (options) { | ||
child.rootUrl = options.rootUrl || child.rootUrl; | ||
child.logger = options.logger || child.logger; | ||
child.timeout = options.timeout || child.timeout; | ||
child.headers = util._extend(child.headers, options.headers); | ||
} | ||
return child; | ||
@@ -94,3 +101,3 @@ }; | ||
return superagent(method, href) | ||
.set('Authorization', self._authorization || '') | ||
.set(self.headers) | ||
.timeout(self.timeout) | ||
@@ -97,0 +104,0 @@ .use(superagentThen) |
{ | ||
"name": "proxy-client", | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"description": "A simple base class for API clients, proxyable through Node.", | ||
@@ -5,0 +5,0 @@ "main": "lib/proxy-client.js", |
@@ -1,4 +0,3 @@ | ||
node-proxy-client | ||
================= | ||
# ProxyClient | ||
A simple base class for API clients, proxyable through Node. |
Sorry, the diff of this file is not supported yet
10727
254
4