Browse files

Added 'headers' field to opts for request/relax. This gives you the a…

…bility to pass in request headers.
  • Loading branch information...
1 parent 8091dcb commit 8eff6dcbc2910639868ca457e7ea79cc73f81331 @streunerlein streunerlein committed May 25, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 nano.js
View
6 nano.js
@@ -124,6 +124,12 @@ module.exports = exports = nano = function database_module(cfg) {
req.uri = u.resolve(req.uri, opts.db);
}
+ if (opts.headers) {
+ for (var k in opts.headers) {
+ req.headers[k] = opts.headers[k];
+ }
+ }
+
if(opts.path) {
req.uri += "/" + opts.path;
}

0 comments on commit 8eff6dc

Please sign in to comment.