Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Riak Erlang client using the HTTP interface
Erlang Makefile

Merge pull request #52 from basho/rebar/fd/riakc-dependency

Corrected riakc tagged dependency
latest commit 106b367d54
@fadushin fadushin authored
Failed to load latest commit information.
ebin Add Riak 2.0 CRDT support.
include Add 2i changes from 1.4.4-1.4.6
src add get_preflist to http-client
.gitignore Add ignore file for git
.hgignore ignore generated edoc files
.hgtags Added tag riakhttps-0.9.2 for changeset f62a90deeaf3
.travis.yml Remove Erlang versions prior to 15B01 from the Travis config. We can'…
LICENSE add license headers
Makefile Change "doc" makefile target to run EDoc via rebar Updated to reflect the requirement for Erlang OTP version …
rebar Change rebar to same version as riak, compiled on R14.
rebar.config Corrected riakc tagged dependency



Travis-CI ::

riak-erlang-http-client is an Erlang client for Riak, using the HTTP interface

Quick Start

You must have Erlang/OTP R15B01 or later and a GNU-style build system to compile and run riak-erlang-http-client.

git clone git://
cd riak-erlang-http-client

If the Protocol Buffers Riak Erlang Client (riak-erlang-client) is already familiar to you, you should find this client familiar. Just substitute calls to riakc_pb_socket with calls to rhc.

As a quick example, here is how to create and retrieve a value with the key “foo” in the bucket “bar” using the riak-erlang-http-client.

First, start up an Erlang shell with the path to riak-erlang-http-client and all dependenciess included, then start sasl and ibrowse:

erl -pa path/to/riak-erlang-http-client/ebin path/to/riak-erlang-http-client/deps/*/ebin
Eshell V5.8.2  (abort with ^G)
1> [ ok = application:start(A) || A <- [sasl, ibrowse] ].

Next, create your client:

2> IP = "",
2> Port = 8098,
2> Prefix = "riak",
2> Options = [],
2> C = rhc:create(IP, Port, Prefix, Options).

Sidenote: if you will be using the defaults, as in the example above, you may call rhc:create/0 instead of specifying the defaults yourself.

Create a new object, and store it with rhc:put/2:

3> Bucket = <<"bar">>,
3> Key = <<"foo">>,
3> Data = <<"hello world">>,
3> ContentType = <<"text/plain">>,
3> Object0 = riakc_obj:new(Bucket, Key, Data, ContentType),
3> rhc:put(C, Object0).

Retrieve an object with rhc:get/3:

4> Bucket = <<"bar">>,
4> Key = <<"foo">>,
4> {ok, Object1} = rhc:get(C, Bucket, Key).
                 <<"hello world">>}],

Please refer to the generated documentation for more information:

make doc && open doc/index.html


We encourage contributions to riak-erlang-http-client from the community.

  1. Fork the riak-erlang-http-client repository on Github.
  2. Clone your fork or add the remote if you already have a clone of the repository.
git clone
# or
git remote add mine
  1. Create a topic branch for your change.
git checkout -b some-topic-branch
  1. Make your change and commit. Use a clear and descriptive commit message, spanning multiple lines if detailed explanation is needed.
  2. Push to your fork of the repository and then send a pull-request through Github.
git push mine some-topic-branch
  1. A Basho engineer or community maintainer will review your patch and merge it into the main repository or send you feedback.
Something went wrong with that request. Please try again.