anchor.diff:  receive_chunk({gun_data, _Pid, _StreamRef, fin, Data},
                 #{responses := Responses} = State) ->
       NewResponses = queue:in(Data, Responses),
  -    {next_state, open_state, State#{responses => NewResponses}};
  +    {next_state, at_rest, State#{responses => NewResponses}};
   receive_chunk({gun_error, _Pid, _StreamRef, _Reason}, State) ->
  -    {next_state, open_state, State}.
  +    {next_state, at_rest, State}.
   
   %% internal
   clean_state() ->
  
positive.code:                           headers => Headers,
                            body => NewData
                           }),
      {next_state, open_state, State};
  receive_data({gun_error, _Pid, StreamRef, _Reason},
               #{stream := StreamRef} = State) ->
      {next_state, open_state, State}.
  
  %% chunked data response
  receive_chunk({'DOWN', _, _, _, _Reason}, _State) ->
  
negative.code:         ]).
  
  -export([
           at_rest/2,
           at_rest/3,
           wait_response/2,
           receive_data/2,
           receive_chunk/2
  