anchor.diff:          _ -> ok
       end,
       {next_state, wait_response, NewState}.
  -
  --spec at_rest(term(), pid(), term()) -> term().
  -at_rest(Event, From, State) ->
  -    enqueue_work_or_stop(at_rest, Event, From, State).
  -
  -%% @private
  --spec wait_response(term(), pid(), term()) -> term().
  -wait_response(Event, From, State) ->
  -    enqueue_work_or_stop(wait_response, Event, From, State).
   
   %% @private
   -spec wait_response(term(), term()) -> term().
  
positive.code:                  async_mode => AsyncMode
                  },
      {next_state, wait_response, NewState};
  at_rest({HttpVerb, Args, From}, State = #{pid := Pid}) ->
      {_, _, Body} = Args,
      StreamRef = do_http_verb(HttpVerb, Pid, Args),
      CleanState = clean_state(State),
      NewState = CleanState#{ pid    => Pid
  
negative.code: %% @private
  get_pending_reqs(State) ->
      maps:get(pending_requests, State).
  
  %% @private
  -spec unexpected_event_warning(atom(), any()) -> ok.
  unexpected_event_warning(StateName, Event) ->
      error_logger:warning_msg( "Unexpected event in state '~p': ~p~n"
                              , [StateName, Event]
                              ).
  