creationix / couch-client

A minimal CouchDB client that easy and powerful
MIT License
101 stars 9 forks source link

view() improvment & bugfix #10

Closed dready92 closed 13 years ago

dready92 commented 13 years ago

Hello,

here are two little commits, in the first one I parse the first view arguments to allow queries like :

Users.view("design_name/usernames",{},function(){});

which will create the pathname uri.pathname+"/_design/design_name/_view/usernames"

The second one is a bugfix : when requesting a view with the "keys" argument on CouchDB the request should be POSTed with apropriate JSON encoded body. I hope you'll merge.

Regards,

Mickael

janpieper commented 13 years ago

+1 for this patch