How to check if a couchdb document exists (without retrieving it)?

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.

Up vote 4 down vote favorite share g+ share fb share tw.

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: wiki.apache.org/couchdb/HTTP_Document_AP... couchdb link|improve this question edited May 14 '10 at 10:46 asked May 14 '10 at 1:18user8902197221437 98% accept rate.

Thank you, I will try that soon :) - karlthorwald - aka – user89021 May 14 '10 at 10:46.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions