anchor.diff:  allowed_methods(Req, State) ->
       {['GET'], Req, State}.
   
  -validate_any_request(Req, #base_state{chef_db_context = DbContext,
  +validate_request(_Method, Req, #base_state{chef_db_context = DbContext,
                                         organization_name = OrgName,
                                         resource_state = ClientState} = State) ->
       Name = chef_wm_util:object_name(client, Req),
  
positive.code:     ClientState1 = ClientState#client_state{chef_client = Client},
      {Req, State#base_state{resource_state = ClientState1}}.
  
  validate_request('PUT', Req, State) ->
      {Req1, State1} = validate_any_request(Req, State),
      #base_state{resource_state =
                      #client_state{chef_client = OldClient} = ClientState} = State1,
      case OldClient of
          not_found ->
              {Req1, State1};
          _ ->
              % FIXME: parse_binary_json can probably be simplified to NOT need a
              % name passed to it; the name extracted from the old client here is
              % the same as the request name, since the request name is used to pull
              % the old client from the database in the first place.
              #chef_client{name = Name} = OldClient,
              Body = wrq:req_body(Req),
              {ok, ClientData} = chef_client:parse_binary_json(Body, Name, OldClient),
              {Req1, State1#base_state{resource_state =
                                           ClientState#client_state{client_data =
                                                                        ClientData}}}
      end;
  validate_request(_Other, Req, State) ->
      validate_any_request(Req, State).
  
  %% This should never get called.
  auth_info(Req, State) ->
      {{halt, 404}, Req, State}.
  
  set_http_response_code(Name, ReqName, Uri, Request) ->
      % If this is a rename, we need to add the Location header so it returns 201
      case ReqName of
          Name ->
              Request;
          _ ->
              wrq:set_resp_header("Location", binary_to_list(Uri), Request)
      end.
  
  to_json(Req, #base_state{resource_state =
                               #client_state{chef_client = Client},
  
negative.code:     Json = ejson:encode(EJson),
      {Json, Req, State}.
  
  malformed_request_message(Any, _Req, _State) ->
      error({unexpected_malformed_request_message, Any}).
  
  