Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hanj4096 authored Nov 10, 2020
1 parent 406d0d4 commit d69b747
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ $GOPATH/bin/raftdb -id node03 -haddr raft-cluster-host03:8091 -raddr raft-cluste
## Reading and writing keys
You can now set a key and read its value back:
```bash
curl -XPOST raft-cluster-host01:8091/key -d '{"foo": "bar"}' -L
curl -XGET raft-cluster-host01:8091/key/foo -L
curl -X POST raft-cluster-host01:8091/key -d '{"foo": "bar"}' -L
curl -X GET raft-cluster-host01:8091/key/foo -L
```

You can now delete a key and its value:
```bash
curl -XDELETE raft-cluster-host02:8091/key/foo -L
curl -X DELETE raft-cluster-host02:8091/key/foo -L
```

### Three read consistency level
You can now read the key's value by different read consistency level:
```bash
curl -XGET raft-cluster-host02:8091/key/foo?level=stale
curl -XGET raft-cluster-host02:8091/key/foo?level=default -L
curl -XGET raft-cluster-host02:8091/key/foo?level=consistent -L
curl -X GET raft-cluster-host02:8091/key/foo?level=stale
curl -X GET raft-cluster-host02:8091/key/foo?level=default -L
curl -X GET raft-cluster-host02:8091/key/foo?level=consistent -L
```


0 comments on commit d69b747

Please sign in to comment.