Created
February 26, 2013 23:37
-
-
Save bdionne/5043415 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~/emacs/api-tests/hacks:master$ curl -X DELETE http://127.0.0.1:15984/foo | |
| {"ok":true} | |
| ~/emacs/api-tests/hacks:master$ curl -X PUT http://127.0.0.1:15984/foo | |
| {"ok":true} | |
| ~/emacs/api-tests/hacks:master$ curl -X PUT http://127.0.0.1:15984/foo/doc1 -d '{"foo":1}' | |
| {"ok":true,"id":"doc1","rev":"1-4a7e4ae49c4366eaed8edeaea8f784ad"} | |
| ~/emacs/api-tests/hacks:master$ curl -X PUT 'http://127.0.0.1:15984/foo/doc1' -d '{"_rev":"1-4a7e4ae49c4366eaed8edeaea8f784ad","foo":2}' | |
| {"ok":true,"id":"doc1","rev":"2-2ee767305024673cfb3f5af037cd2729"} | |
| ~/emacs/api-tests/hacks:master$ curl -X PUT 'http://127.0.0.1:15984/foo/doc1' -d '{"_rev":"2-2ee767305024673cfb3f5af037cd2729","foo":3}' | |
| {"ok":true,"id":"doc1","rev":"3-efc54218773c6acd910e2e97fea2a608"} | |
| ~/emacs/api-tests/hacks:master$ curl -X DELETE 'http://127.0.0.1:15984/foo/doc1?rev=3-efc54218773c6acd910e2e97fea2a608' | |
| {"ok":true,"id":"doc1","rev":"4-f926898739928c370a20bccdcd4ab299"} | |
| ~/emacs/api-tests/hacks:master$ curl -X PUT 'http://127.0.0.1:15984/foo/doc1' -d '{"_rev":"3-efc54218773c6acd910e2e97fea2a608","foo":4}' | |
| {"error":"conflict","reason":"Document update conflict."} | |
| ~/emacs/api-tests/hacks:master$ curl -X PUT 'http://127.0.0.1:15984/foo/doc1?rev=3-efc54218773c6acd910e2e97fea2a608' -d '{"foo":4}' | |
| {"ok":true,"id":"doc1","rev":"1-80d7ea9795ad67ad0e7a1e567c15314e"} | |
| ~/emacs/api-tests/hacks:master$ curl 'http://127.0.0.1:15984/foo/doc1' | |
| {"_id":"doc1","_rev":"1-80d7ea9795ad67ad0e7a1e567c15314e","foo":4} | |
| ~/emacs/api-tests/hacks:master$ curl 'http://127.0.0.1:15984/foo/doc1?open_revs=all' | |
| [{"ok":{"_id":"doc1","_rev":"1-80d7ea9795ad67ad0e7a1e567c15314e","foo":4}},{"ok":{"_id":"doc1","_rev":"4-f926898739928c370a20bccdcd4ab299","_deleted":true}}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment