How can I just check if a document exists, mabye get the revision, but not make couchdb send the body of the document?
I remember I saw this explained somewhere but I cannot find it.
Edit: Iirc in the example you received only a http header with no data. The header indicated if present or not.
Edit2: Evan suggests to make a HEAD request (instead of GET). This answers my question.
CouchDB sends an ETag Header for document requests. The ETag Header is simply the document's revision in quotes.
Quoted from: http://wiki.apache.org/couchdb/HTTP_Document_API#ETags.2BAC8-Caching
In case you want to check the status of CouchDB, you can do so using the following command: sudo status couchdb.
CouchDB packaged by BitnamiBitnami has partnered with Google to make CouchDB available in the Google Cloud Platform.
Apache CouchDB (CouchDB (link resides outside IBM)) is an open source NoSQL document database that collects and stores data in JSON-based document formats.
CouchDB is an open source NoSQL database based on common standards to facilitate Web accessibility and compatibility with a variety of devices. NoSQL databases are useful for very large sets of distributed data, especially for the large amounts of non-uniform data in various formats that is characteristic of big data.
Instead of performing a HTTP GET request, do a HTTP HEAD request. This will only return the headers and no content. The returned status will tell you if the object exists.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With