mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
dev-guide: document using range_end for prefixes with json
Lack of a range_end example has caused some confusion.
This commit is contained in:
parent
1010b82de2
commit
da2f4bb25d
@ -26,6 +26,11 @@ curl -L http://localhost:2379/v3alpha/kv/put \
|
|||||||
curl -L http://localhost:2379/v3alpha/kv/range \
|
curl -L http://localhost:2379/v3alpha/kv/range \
|
||||||
-X POST -d '{"key": "Zm9v"}'
|
-X POST -d '{"key": "Zm9v"}'
|
||||||
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}],"count":"1"}
|
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}],"count":"1"}
|
||||||
|
|
||||||
|
# get all keys prefixed with "foo"
|
||||||
|
curl -L http://localhost:2379/v3alpha/kv/range \
|
||||||
|
-X POST -d '{"key": "Zm9v", "range_end": "Zm9w"}'
|
||||||
|
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}],"count":"1"}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Watch keys
|
### Watch keys
|
||||||
|
Loading…
x
Reference in New Issue
Block a user