anchor.diff:  
   %% @private
   -spec get_work(state()) -> no_work | {ok, work(), state()}.
  -get_work(State) ->
  -    PendingReqs = maps:get(pending_requests, State),
  +get_work(StateData) ->
  +    PendingReqs = maps:get(pending_requests, StateData),
       case queue:is_empty(PendingReqs) of
           true ->
               no_work;
           false ->
               {{value, Work}, Rest} = queue:out(PendingReqs),
  -            NewState = State#{pending_requests => Rest},
  -            {ok, Work, NewState}
  +            NewStateData = StateData#{pending_requests => Rest},
  +            {ok, Work, NewStateData}
       end.
   
   %% @private
   -spec append_work(work(), state()) -> state().
  -append_work(Work, State) ->
  -    #{pending_requests := PendingReqs} = State,
  -    State#{pending_requests := queue:in(Work, PendingReqs)}.
  +append_work(Work, StateData) ->
  +    #{pending_requests := PendingReqs} = StateData,
  +    StateData#{pending_requests := queue:in(Work, PendingReqs)}.
   
   %% @private
   -spec binary_ltrim(binary()) -> binary().
  
positive.code:     {next_state, atom(), state(), timeout()}.
  wait_response({call, From}
                , {data, Data, FinNoFin}
                , #{stream := StreamRef, pid := Pid} = State) ->
      ok = gun:data(Pid, StreamRef, FinNoFin, Data),
      gen_statem:reply(From, ok),
      {next_state, wait_response, State};
  wait_response({call, From}, Event, State) ->
      enqueue_work_or_stop(wait_response, Event, From, State);
  wait_response(cast, {'DOWN', _, _, _, Reason}, _State) ->
      exit(Reason);
  wait_response(cast, {gun_response, _Pid, _StreamRef, fin, StatusCode, Headers},
                #{from := From} = State) ->
      Response = #{status_code => StatusCode, headers => Headers},
      gen_statem:reply(From, {ok, Response}),
      {next_state, at_rest, State, 0};
  wait_response(cast, {gun_response, _Pid, _StreamRef, nofin, StatusCode, Headers},
                #{from := From, stream := StreamRef, async := Async} = State) ->
      StateName =
        case lists:keyfind(<<"transfer-encoding">>, 1, Headers) of
            {<<"transfer-encoding">>, <<"chunked">>} when Async ->
  
negative.code:     {keep_state, state()} |
      {next_state, atom(), state()} |
      {next_state, atom(), state(), timeout()}.
  receive_data({call, From}, Event, StateData) ->
      enqueue_work_or_stop(receive_data, Event, From, StateData);
  receive_data(cast, {'DOWN', _, _, _, _Reason}, _StateData) ->
      error(incomplete);
  receive_data(cast, {gun_data, _Pid, StreamRef, nofin, Data},
               #{stream := StreamRef, data := DataAcc} = StateData) ->
      NewData = <<DataAcc/binary, Data/binary>>,
      {next_state, receive_data, StateData#{data => NewData}};
  receive_data(cast, {gun_data, _Pid, _StreamRef, fin, Data},
               #{data := DataAcc, from := From, status_code
                 := StatusCode, headers := Headers} = StateData) ->
      NewData = <<DataAcc/binary, Data/binary>>,
      Result = {ok, #{status_code => StatusCode,
                      headers => Headers,
                      body => NewData
                     }},
      gen_statem:reply(From, Result),
      {next_state, at_rest, StateData, 0};
  receive_data(cast, {gun_error, _Pid, StreamRef, _Reason},
               #{stream := StreamRef} = StateData) ->
      {next_state, at_rest, StateData, 0};
  receive_data(info, Event, StateData) ->
      handle_info(Event, receive_data, StateData).
  
  %% @private
  %% @doc Chunked data response
  