Skip to content

Instantly share code, notes, and snippets.

@seth
Created July 19, 2010 19:53
Show Gist options
  • Save seth/481900 to your computer and use it in GitHub Desktop.
Save seth/481900 to your computer and use it in GitHub Desktop.
13> X3 = riakc_obj:new(<<"b">>, <<"k">>, <<"{\"v\":123}">>, <<"application/json">>).
{riakc_obj,<<"b">>,<<"k">>,undefined,[],
{dict,1,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],...},
{{[],[],[],[],[],[],[],[],[],[],[[<<...>>|...]],[],[],...}}},
<<"{\"v\":123}">>}
14> riakc_obj:get_update_content_type(X3).
<<"application/json">>
15> riakc_pb_socket:put(Pid, X3).
ok
16> {ok, X4} = riakc_pb_socket:get(Pid, <<"b">>, <<"k">>).
{ok,{riakc_obj,<<"b">>,<<"k">>,
<<107,206,97,96,96,96,202,96,202,5,82,44,204,143,110,148,
101,48,37,50,230,177,50,...>>,
[{{dict,2,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],...},
{{[],[],[],[],[],[],[],[],[],[],...}}},
<<"{\"v\":123}">>}],
undefined,undefined}}
17> riakc_obj:get_update_content_type(X4).
undefined
18> riakc_obj:get_content_type(X4).
undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment