erlang client

Michael Martin mmartin4242 at
Sun Feb 1 13:34:52 EST 2015

Hello, I'm working on a little e2 application that needs to put/get data 
to/from riak. I apparently have a misunderstanding
about some things.

I can successfully put and get key-value pairs to a bucket using the 
erlang client. However, when I try to curl the
data out, I get nothing. In fact, doing curl -X GET 
"http://riak1:8098/riak?buckets=true" returns '{"buckets":[]}'.
Ditto for curl -X GET "".

In my application, though, I can do this:

8> Object = riakc_obj:new(<<"testbucket">>, <<"testkey">>, 
<<"testdata">>). {riakc_obj,<<"testbucket">>,<<"testkey">>,undefined,[],
9> riakc_pb_socket:put(Pid, Object).
10> riakc_pb_socket:get(Pid, <<"testbucket">>, <<"testkey">>).
11> riakc_pb_socket:list_buckets(Pid).

So what is the difference between the two? How can I use curl (or any 
other client) to see the buckets, and retrieve

Michael Martin

More information about the riak-users mailing list