Created
July 29, 2013 22:50
-
-
Save PharkMillups/6108587 to your computer and use it in GitHub Desktop.
This file contains 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
// Create a new bucket in Riak and enable `allow_mult` | |
$ curl -i http://localhost:8098/buckets/new_hotness/props \ | |
-X PUT -d '{"props":{"allow_mult":true}}' -H "Content-Type: application/json" | |
// POST to the `counters` resource. In this example we're adding "1" to the "riak-counters-blog-post-views" counter | |
$ curl -i http://localhost:8098/buckets/new_hotness/counters/riak-counters-blog-post-views \ | |
-X POST -d "1" | |
// To read the value of a counter, do a GET on the same object | |
$ curl -i http://localhost:8098/buckets/new_hotness/counters/riak-counters-blog-post-views |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment