anchor.diff:           service_available/2,
            is_authorized/2,
            forbidden/2,
  +         resource_exists/2,
            content_types_provided/2,
            encodings_provided/2,
            produce_bucket_list/2,
  
positive.code:     case wrq:get_qs_value(?Q_BUCKETS, RD) of
          ?Q_TRUE ->
              %% Get the buckets.
              {ok, Buckets} = Client:list_buckets(Timeout),
              {mochijson2:encode({struct, [{?JSON_BUCKETS, Buckets}]}), 
               RD, Ctx};
          ?Q_STREAM ->
              F = fun() ->
                          {ok, ReqId} = Client:stream_list_buckets(Timeout),
                          stream_buckets(ReqId)
                  end,
              {{stream, {[], F}}, RD, Ctx};
  
negative.code: 
  %% @type context() = term()
  -record(ctx, {
            bucket_type,  %% binary() - bucket type (from uri)
            api_version,  %% integer() - Determine which version of the API to use.
            client,       %% riak_client() - the store client
            prefix,       %% string() - prefix for resource uris
            riak,         %% local | {node(), atom()} - params for riak client
            method,       %% atom() - HTTP method for the request
            timeout,      %% integer() - list buckets timeout
            security     %% security context
           }).
  
  -include_lib("webmachine/include/webmachine.hrl").
  