anchor.diff:           forbidden/2,
            content_types_provided/2,
            encodings_provided/2,
  +         resource_exists/2,
            produce_bucket_body/2,
            malformed_request/2
           ]).
   
   %% @type context() = term()
   -record(ctx, {api_version,  %% integer() - Determine which version of the API to use.
  +              bucket_type,  %% binary() - Bucket type (from uri)
                 bucket,       %% binary() - Bucket name (from uri)
                 client,       %% riak_client() - the store client
                 prefix,       %% string() - prefix for resource uris
  
positive.code: %%      opportunity to extract the 'bucket' and 'key' path
  %%      bindings from the dispatch, as well as any vtag
  %%      query parameter.
  service_available(RD, Ctx=#ctx{riak=RiakProps}) ->
      case riak_kv_wm_utils:get_riak_client(RiakProps, riak_kv_wm_utils:get_client_id(RD)) of
          {ok, C} ->
              {true,
  
negative.code: %%      is specified, keys will be streamed back to the client in JSON chunks
  %%      like so: {"keys":[Key1, Key2,...]}.
  produce_bucket_body(RD, #ctx{client=Client,
                               bucket=Bucket0,
                               bucket_type=Type,
                               timeout=Timeout,
                               allow_props_param=AllowProps}=Ctx) ->
      Bucket = riak_kv_wm_utils:maybe_bucket_type(Type, Bucket0),
      IncludeBucketProps = (AllowProps == true)
          andalso (wrq:get_qs_value(?Q_PROPS, RD) /= ?Q_FALSE),
  
  