anchor.diff:  	expect(Req, State, service_available, true, fun known_methods/2, 503).
   
   %% known_methods/2 should return a list of atoms or binary methods.
  -known_methods(Req=#http_req{method=Method}, State) ->
  +known_methods(Req, State=#state{method=Method}) ->
   	case call(Req, State, known_methods) of
   		no_call when Method =:= 'HEAD'; Method =:= 'GET'; Method =:= 'POST';
   					Method =:= 'PUT'; Method =:= 'DELETE'; Method =:= 'TRACE';
  
positive.code: 	-> {ok, Req} | close when Req::cowboy_req:req().
  upgrade(_ListenerPid, Handler, Opts, Req) ->
  	try
  		case erlang:function_exported(Handler, rest_init, 2) of
  			true ->
  				case Handler:rest_init(Req, Opts) of
  					{ok, Req2, HandlerState} ->
  						service_available(Req2, #state{handler=Handler,
  							handler_state=HandlerState})
  				end;
  			false ->
  				service_available(Req, #state{handler=Handler})
  		end
  	catch Class:Reason ->
  		PLReq = cowboy_req:to_list(Req),
  
negative.code: precondition_failed(Req, State) ->
  	respond(Req, State, 412).
  
  is_put_to_missing_resource(Req, State=#state{method='PUT'}) ->
  	moved_permanently(Req, State, fun is_conflict/2);
  is_put_to_missing_resource(Req, State) ->
  	previously_existed(Req, State).
  