anchor.diff:  
   -spec get(pid(), string(), headers(), options()) -> response().
   get(Pid, Url, HeadersMap, Options) ->
  -    Headers = maps:to_list(HeadersMap),
  +    Headers = basic_auth_header(Options, maps:to_list(HeadersMap)),
   
       HandleEvent = maps_get(handle_event, Options, undefined),
       Async = maps_get(async, Options, undefined),
  
positive.code:             gen_fsm:sync_send_event(Pid, {asyncget, Url, Headers, HandleEvent})
      end.
  
  -spec events(Pid :: pid()) -> {binary()}.
  events(Pid) ->
      gen_fsm:sync_send_all_state_event(Pid, get_response).
  
  
negative.code: manage_chunk(IsFin, HandleEvent, StreamRef, Data, _Responses, State) ->
      HandleEvent(IsFin, StreamRef, Data),
      {next_state, receive_chunk, State}.
  
  basic_auth_header(Options, Headers) ->
      case maps_get(basic_auth, Options, undefined) of
          undefined ->
              Headers;
          {User, Password} ->
              Base64 = encode_basic_auth(User, Password),
              BasicAuth = {<<"Authorization">>, <<"Basic", Base64/binary>>},
              [BasicAuth | Headers]
      end.
  
  encode_basic_auth([], []) ->
      [];
  encode_basic_auth(Username, Password) ->
      base64:encode(Username ++ [$: | Password]).
  