Created
August 5, 2016 16:59
-
-
Save eiri/7bbc28244b6f88a33b2a7003c43dd9b8 to your computer and use it in GitHub Desktop.
open_revs with httpie example
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
$ http :5984 | |
{ | |
“couchdb”: “Welcome”, | |
“uuid”: “6c77bce10369b93fa79b8488f1e25444”, | |
“vendor”: { | |
“name”: “Homebrew”, | |
“version”: “1.6.1_6” | |
}, | |
“version”: “1.6.1” | |
} | |
$ http put :5984/kuroneko | |
{ | |
“ok”: true | |
} | |
$ http put :5984/kuroneko/shiro name=shiro suffix=sama | |
{ | |
“id”: “shiro”, | |
“ok”: true, | |
“rev”: “1-f6ae51743ea84a2e2732979b4f51dab8” | |
} | |
$ http put :5984/kuroneko/shiro name=shiro suffix=chan rev==1-f6ae51743ea84a2e2732979b4f51dab8 | |
{ | |
“id”: “shiro”, | |
“ok”: true, | |
“rev”: “2-59b92374b8354579f84472ac6183bc45” | |
} | |
$ http get :5984/kuroneko/shiro | |
{ | |
“_id”: “shiro”, | |
“_rev”: “2-59b92374b8354579f84472ac6183bc45”, | |
“name”: “shiro”, | |
“suffix”: “chan” | |
} | |
$ http get :5984/kuroneko/shiro open_revs==“[\”1-f6ae51743ea84a2e2732979b4f51dab8\”, \”1-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\”, \”2-59b92374b8354579f84472ac6183bc45\”, \”2-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\”]” | |
[ | |
{ | |
“ok”: { | |
“_id”: “shiro”, | |
“_rev”: “1-f6ae51743ea84a2e2732979b4f51dab8”, | |
“name”: “shiro”, | |
“suffix”: “sama” | |
} | |
}, | |
{ | |
“ok”: { | |
“_id”: “shiro”, | |
“_rev”: “2-59b92374b8354579f84472ac6183bc45”, | |
“name”: “shiro”, | |
“suffix”: “chan” | |
} | |
}, | |
{ | |
“missing”: “1-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa” | |
}, | |
{ | |
“missing”: “2-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb” | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment