incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Ivasyuv <indust...@gmail.com>
Subject Re: DELETE doc without rev
Date Tue, 19 Oct 2010 13:31:03 GMT
On 10/19/2010 04:29 PM, Matt Goodall wrote:
> On 19 October 2010 12:35, Alex Ivasyuv<industral@gmail.com>  wrote:
>    
>> Thanks Matt for reply, but question still exist, is there some way to delete
>> doc in ONE request without mentioned revision. In your example I need to
>> make a GET request first.
>>      
> It's not possible in 1 request. As I said, you must provide the current _rev.
>    

Got it,

Thanks for support!

> - Matt
>
>    
>> Thanks,
>>
>> Sent from my HTC
>>
>> ----- Reply message -----
>> From: "Matt Goodall"<matt.goodall@gmail.com>
>> Date: Tue, Oct 19, 2010 2:04 pm
>> Subject: DELETE doc without rev
>> To:<user@couchdb.apache.org>
>>
>> On 19 October 2010 11:39, Alex Ivasyuv<industral@gmail.com>  wrote:
>>      
>>> Hi,
>>>
>>> I would like to delete a document from DB. But for this purpose I need to
>>> explicitly mentioned a version, what's assume, to get
>>> one more call for get it.
>>> Is there any way to delete doc without mentioned revision of doc, e.g.
>>>
>>> $ curl -X DELETE http://localhost:5984/mydb/mydoc-123
>>>        
>> You must provide the current _rev to delete a document. However, you
>> can get the doc's current rev from the ETag in a HEAD response.
>>
>> $ curl http://localhost:5984/mydb/mydoc-123 -I
>> HTTP/1.1 200 OK
>> Server: CouchDB/1.0.1 (Erlang OTP/R13B)
>> Etag: "3-825cb35de44c433bfb2df415563a19de"
>> Date: Tue, 19 Oct 2010 11:00:41 GMT
>> Content-Type: text/plain;charset=utf-8
>> Content-Length: 64
>> Cache-Control: must-revalidate
>>
>> - Matt
>>
>>
>>
>>      


-- 
Best regards,
Alex Ivasyuv
Senior WebUI Software Engineer
ReelRoles, Inc.



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message