Hi Tony,

The REST API can only access bucket and keys that are UTF-8 strings. A
request for "foo/%00%0009" is the same as:
{ok, C} = riak:local_client().
C:get(<<"foo">>, <<"%00%0009">>).

The protobuffs and native Erlang clients do not have this restriction which
may lead to scenarios where data cannot be accessed by the REST API. Bucket
and key values should be chosen appropriately when REST API access is
required.

Thanks,
Dan

Daniel Reverri
Developer Advocate
Basho Technologies, Inc.
d...@basho.com


On Mon, Aug 23, 2010 at 3:05 PM, Tony Novak <t...@dapper.net> wrote:

> Hi there,
>
> Quick newbie question: is there a restriction on what bytes can appear in
> keys, or can they consist of arbitrary binary data?  Using the Java
> protocol-buffers client, I seem to be able to use arbitrary binary data in
> both keys and values, but I'm having trouble retrieving this data via REST.
>  As an example, suppose my key consists of the bytes (0x00, 0x00, 0x30,
> 0x39).  How can I access this key via REST?  The following doesn't seem to
> work:
>
> curl http://localhost:8098/riak/foo/%00%0009
>
> Am I encoding the URL incorrectly?
>
> Thanks!
> Tony
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to