kchodorow/sleepy.mongoose — pull request #24 by rayie (2011-11-05 07:30:04+00:00)
Title: Added 2 methods:

_count
_find_and_modify

count is called the same way as find, returns {count: ..,ok:1}
find_and_modify requires POST, and accepts parameters as mongodb findAndModify (1.3+), with defaults
example:

curl --data 'new=1&query={"honey":"yes"}&upsert=1&newobj={"$set":{"ounces":100}}' 'http://localhost:27080/foo/bar/_find_and_modify'

returns matched document or new document if new=1