anchor.diff:  %% under the License.
   %%
   
  -
   -module(chef_wm_base).
   
   %% Complete webmachine callbacks
  
positive.code: content_types_provided(Req, State) ->
      {[{"application/json", to_json}], Req, State}.
  
  finish_request(Req, #base_state{reqid = ReqId}=State) ->
      try
          Code = wrq:response_code(Req),
          log_request(Req, State),
          stats_hero:report_metrics(ReqId, Code),
          stats_hero:stop_worker(ReqId),
          case Code of
              500 ->
                  Req1 = create_500_response(Req, State),
                  {true, Req1, State};
              _ ->
                  Req1 = add_api_info_header(Req, State),
                  {true, Req1, State}
          end
      catch
          X:Y ->
  
negative.code:         Guid -> Guid
      end.
  
  maybe_annotate_org_specific(?OSC_ORG_NAME, _Darklaunch, Req) ->
      Req;
  maybe_annotate_org_specific(OrgName, Darklaunch, Req) ->
      %% Generate the darklaunch header in a form that won't break log parsing
      DLData = chef_wm_darklaunch:get_proplist(Darklaunch),
      add_notes([{org_name, OrgName},
                 {darklaunch, DLData}], Req).
  
  %% If request results in a rename, then set Location header and wm will return with a 201.
  %% Currently, only the clients endpoint supports rename
  