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

Commit

Permalink
[docs] adds documentation for setting headers
Browse files Browse the repository at this point in the history
  • Loading branch information
dscape committed Jun 11, 2012
1 parent d39ac04 commit c10c6fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Expand Up @@ -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])

Expand Down
1 change: 1 addition & 0 deletions nano.js
Expand Up @@ -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
Expand Down

0 comments on commit c10c6fb

Please sign in to comment.