Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[docs] adds documentation for setting headers

  • Loading branch information...
commit c10c6fb90fcc898590b6defd9c943a2acfa1f486 1 parent d39ac04
Nuno Job authored
Showing with 10 additions and 8 deletions.
  1. +9 −8 README.md
  2. +1 −0  nano.js
17 README.md
View
@@ -246,15 +246,16 @@ alias for `nano.use`
makes a request to couchdb, the available `opts` are:
-* `opts.db` - the database name
-* `opts.method` - the http method, defaults to `get`
-* `opts.path` - the full path of the request, overrides `opts.doc` and
+* `opts.db` the database name
+* `opts.method` the http method, defaults to `get`
+* `opts.path` the full path of the request, overrides `opts.doc` and
`opts.att`
-* `opts.doc` - the document name
-* `opts.att` - the attachment name
-* `opts.content_type` - the content type of the request, default to `json`
-* `opts.body` - the document or attachment body
-* `opts.encoding` - the encoding for attachments
+* `opts.doc` – the document name
+* `opts.att` – the attachment name
+* `opts.content_type` – the content type of the request, default to `json`
+* `opts.headers` – additional http headers, overrides existing ones
+* `opts.body` – the document or attachment body
+* `opts.encoding` – the encoding for attachments
### nano.relax(opts, [callback])
1  nano.js
View
@@ -78,6 +78,7 @@ module.exports = exports = nano = function database_module(cfg) {
* {opts.path:string:optional} a full path, override `doc` and `att`
* {opts.doc:string:optional} document name
* {opts.att:string:optional} attachment name
+ * {opts.headers:object:optional} additional http headers
* {opts.content_type:string:optional} content type, default to json
* {opts.body:object|string|binary:optional} document or attachment body
* {opts.encoding:string:optional} encoding for attachments
Please sign in to comment.
Something went wrong with that request. Please try again.