anchor.diff:      {ok, NewReq :: cowboy_req:req(), State :: any()} |
       {
         shutdown, 
  -      StatusCode :: cowboy_req:http_status(), 
  +      StatusCode :: cowboy:http_status(), 
         Headers :: cowboy:http_headers(),
         Body :: iodata(),
         NewReq :: cowboy_req:req()
  
positive.code: %% Helper functions
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  process_result(Result, Req, State) ->
      case Result of
          {send, Event, NewState}  ->
              EventMsg = build_event(Event),
              ok = cowboy_req:chunk(EventMsg, Req),
              {loop, Req, State#state{state = NewState}};
          {nosend, NewState} ->
              {loop, Req, State#state{state = NewState}};
          {stop, NewState} ->
              {ok, Req, State#state{state = NewState}}
      end.
  
  get_value(Key, PropList) ->
      case lists:keyfind(Key, 1, PropList) of
  
negative.code: build_data(undefined) ->
      throw(data_required);
  build_data(Data) ->
      [[<<"data: ">>, X, <<"\n">>] || X <- binary:split(Data, <<"\n">>, [global])].
  