anchor.diff:  %%
   -spec is_content_acceptable(#rest{}) -> {ok, #rest{}} | {error, {not_acceptable, _}}.
   
  -is_content_acceptable(#rest{head = Head, env = Env} = Rest) ->
  +is_content_acceptable(#rest{inhead = Head, eghead = EgHead} = Rest) ->
      Provide = f(Rest, content_provided),
      Accept  = opts:val('Accept', [{'*', '*'}], Head),
      case
         lists:flatmap(restd:negotiate(_, Provide), Accept)
      of
         [{_, _} = Type | _] ->
  -         {ok, Rest#rest{env = [{'Accept', Type}|Env]}};
  +         % handle content negotiation and preset content type accepted by client 
  +         {ok, Rest#rest{eghead = orddict:store('Content-Type', Type, EgHead)}};
         _ ->
            {error, {not_acceptable, [mimetype(X) || X <- Accept]}}
      end.
  
positive.code:   ,export = undefined :: _               %% resource exports
    ,mthd   = undefined :: _
    ,uri    = undefined :: uri:uri()
    ,head   = undefined :: _
    ,env    = undefined :: _
  }).
  
  
negative.code:    end.
  
  resource(#rest{} = Rest, #http{mthd = Mthd, uri = Uri, head = Head}) ->
     {ok, Rest#rest{mthd = Mthd, uri = Uri, inhead = orddict:from_list(Head), eghead = []}}.
  
  
  %%
  