anchor.diff:                  },
       gen_fsm:reply(From, StreamRef),
       {next_state, wait_response, NewState};
  -at_rest({Verb, false, _HandleEvent, Args}, From, #{pid := Pid}) ->
  -    StreamRef = do_http_verb(Verb, Pid, Args),
  +at_rest({HttpVerb, _HandleEvent, Args}, From, #{pid := Pid}) ->
  +    StreamRef = do_http_verb(HttpVerb, Pid, Args),
       CleanState = clean_state(),
       NewState = CleanState#{
                    pid => Pid,
  
positive.code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  -spec at_rest(term(), pid(), term()) -> term().
  at_rest({Verb, true, HandleEvent, Args}, From, #{pid := Pid}) ->
      StreamRef = do_http_verb(Verb, Pid, Args),
      CleanState = clean_state(),
      NewState = CleanState#{
                    pid => Pid,
  
negative.code: 
  -spec get(pid(), string(), headers(), options()) -> response().
  get(Pid, Url, Headers0, Options) ->
      {HandleEvent, IsAsync, Headers} = process_options(Options, Headers0, get),
      GetVerb = case IsAsync of
                 true -> get_async;
                 false -> get
             end,
      Event = {GetVerb, HandleEvent, {Url, Headers}},
      gen_fsm:sync_send_event(Pid, Event).
  
  %% POST
  -spec post(pid(), string(), headers(), iodata(), options()) -> response().
  post(Pid, Url, Headers0, Body, Options) ->
      {HandleEvent, _, Headers} = process_options(Options, Headers0, post),
      Event = {post, HandleEvent, {Url, Headers, Body}},
      gen_fsm:sync_send_event(Pid, Event).
  
  %% DELETE
  -spec delete(pid(), string(), headers(), options()) -> response().
  delete(Pid, Url, Headers0, Options) ->
      {HandleEvent, _, Headers} = process_options(Options, Headers0, delete),
      Event = {delete, HandleEvent, {Url, Headers}},
      gen_fsm:sync_send_event(Pid, Event).
  
  %% HEAD
  -spec head(pid(), string(), headers(), options()) -> response().
  head(Pid, Url, Headers0, Options) ->
      {HandleEvent, _, Headers} = process_options(Options, Headers0, head),
      Event = {head, HandleEvent, {Url, Headers}},
      gen_fsm:sync_send_event(Pid, Event).
  
  %% OPTIONS
  -spec options(pid(), string(), headers(), options()) -> response().
  options(Pid, Url, Headers0, Options) ->
      {HandleEvent, _, Headers} = process_options(Options, Headers0, options),
      Event = {options, HandleEvent, {Url, Headers}},
      gen_fsm:sync_send_event(Pid, Event).
  
  %% PATCH
  -spec patch(pid(), string(), headers(), iodata(), options()) -> response().
  patch(Pid, Url, Headers0, Body, Options) ->
      {HandleEvent, _, Headers} = process_options(Options, Headers0, patch),
      Event = {patch, HandleEvent, {Url, Headers, Body}},
      gen_fsm:sync_send_event(Pid, Event).
  
  %% PUT
  -spec put(pid(), string(), headers(), iodata(), options()) -> response().
  put(Pid, Url, Headers0, Body, Options) ->
      {HandleEvent, _, Headers} = process_options(Options, Headers0, put),
      Event = {put, HandleEvent, {Url, Headers, Body}},
      gen_fsm:sync_send_event(Pid, Event).
  
  %% @doc Returns a list of all received events up to now.
  