Skip to content
This repository has been archived by the owner on Nov 5, 2018. It is now read-only.

Commit

Permalink
Added 'headers' field to opts for request/relax. This gives you the a…
Browse files Browse the repository at this point in the history
…bility to pass in request headers.
  • Loading branch information
streunerlein committed May 24, 2012
1 parent 8091dcb commit 8eff6dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nano.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8eff6dc

Please sign in to comment.