Created
January 12, 2012 22:40
-
-
Save davisp/1603604 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
{"ok":true} | |
{"ok":true} | |
{"ok":true,"id":"bar","rev":"1-967a00dff5e02add41819138abb3284d"} | |
{"ok":true,"id":"bar","rev":"2-7051cbe5c8faecd085a3fa619e6e6337"} | |
{"ok":true,"id":"bar","rev":"3-7379b9e515b161226c6559d90c4dc49f"} | |
{"ok":true,"id":"bar","rev":"4-2c32ffda5905fe770af07314d0a4f93e"} |
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
#!/bin/sh | |
CURL="curl" | |
JSON_HEADER="-H Content-Type:application/json" | |
REV1="1-967a00dff5e02add41819138abb3284d" | |
REV2="2-7051cbe5c8faecd085a3fa619e6e6337" | |
$CURL -X DELETE http://127.0.0.1:5984/foo | |
$CURL -X PUT http://127.0.0.1:5984/foo | |
$CURL -X PUT $JSON_HEADER http://127.0.0.1:5984/foo/bar \ | |
-d '{}' | |
$CURL -X PUT $JSON_HEADER http://127.0.0.1:5984/foo/bar \ | |
-d '{"_rev": "1-967a00dff5e02add41819138abb3284d"}' | |
$CURL -X DELETE $JSON_HEADER http://127.0.0.1:5984/foo/bar?rev=$REV2 | |
$CURL -X POST $JSON_HEADER http://127.0.0.1:5984/foo/_compact | |
sleep 1 | |
$CURL -X PUT $JSON_HEADER http://127.0.0.1:5984/foo/bar \ | |
-d '{}' | |
#-d '{"_rev": "1-967a00dff5e02add41819138abb3284d"}' |
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
{"ok":true} | |
{"ok":true} | |
{"ok":true,"id":"bar","rev":"1-967a00dff5e02add41819138abb3284d"} | |
{"ok":true,"id":"bar","rev":"2-7051cbe5c8faecd085a3fa619e6e6337"} | |
{"ok":true,"id":"bar","rev":"3-7379b9e515b161226c6559d90c4dc49f"} | |
{"ok":true} | |
{"ok":true,"id":"bar","rev":"1-967a00dff5e02add41819138abb3284d"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment