creationix / couch-client

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

realGet actually Posts? #18

Open brian-lc opened 13 years ago

brian-lc commented 13 years ago

I don't understand why you guys chose to use POST in your get() method to pull documents. Could someone explain this? It doesn't make sense to me.

Thanks.

hdachev commented 13 years ago

The CouchDB HTTP API specifies that the keys query parameter goes over POST. This is probably to keep the url short when you are requesting massive numbers of documents in a single bulk request, which is exactly what happens here as your gets are queued and sent over the connection together.