anchor.diff:                                   {auth, fun handle_add_node_request/1};
                                ["node", "controller", "doJoinCluster"] ->
                                    {auth, fun handle_join/1};
  -                             ["node", "controller", "initStatus"] ->
  -                                 {auth, fun handle_init_status_post/1};
                                ["nodes", NodeId, "controller", "settings"] ->
                                    {auth, fun handle_node_settings_post/2,
                                     [NodeId]};
  
positive.code:         ok
      end,
      handle_streaming(F, Req, HTTPRes, Res).
  
  handle_init_status_post(Req) ->
      %% parameter example: value=done, value=welcome, value=someOpaqueValueFromJavaScript
      %%
      Params = Req:parse_post(),
      case change_init_status(proplists:get_value("value", Params)) of
          false -> Req:respond({400, add_header(), "Attempt to initStatus but missing value parameter.\n"});
          true  -> Req:respond({200, add_header(), []})
      end.
  
  change_init_status(undefined) ->
      ns_log:log(?MODULE, ?INIT_STATUS_BAD_PARAM, "Received request to initStatus but missing value parameter.", []),
      false;
  
  change_init_status(InitStatus) ->
      ns_log:log(?MODULE, ?INIT_STATUS_UPDATED, "initStatus updated to ~p.", [InitStatus]),
      ns_config:set(init_status, [{value, InitStatus}]),
      true.
  
  handle_join(Req) ->
      %% paths:
  
negative.code:                           Candidates)
      end.
  
  %% These represent settings for a cluster.  Node settings should go
  %% through the /node URIs
  handle_settings_web_post(Req) ->
      PostArgs = Req:parse_post(),
      Port = proplists:get_value("port", PostArgs),
      U = proplists:get_value("username", PostArgs),
      P = proplists:get_value("password", PostArgs),
      case validate_settings(Port, U, P) of
          [_Head | _] = Errors ->
              reply_json(Req, Errors, 400);
  