anchor.diff:              {error, Reason}
       end.
   
  -do_get(Host, Url, Headers) ->
  +do_get(Host, Url, Headers, ReportFun) ->
       case send_request(Host, Url, Headers, get, <<>>, proxy_opts()) of
  -        {ok, "200", _Header, _Body} ->
  -            ok;
  +        {ok, "200", _Header, Body} ->
  +            {ok, ReportFun(byte_size(Body))};
           {ok, "404", _Header, _Body} ->
  -            ok;
  +            {ok, 0};
           {ok, Code, _Header, _Body} ->
               {error, {http_error, Code}};
           {error, Reason} ->
  
positive.code:             end
      end.
  
  do_put(Host, Url, Headers, Value) ->
      case send_request(Host, Url, Headers ++ [{'Content-Type', 'application/octet-stream'}],
                        put, Value, proxy_opts()) of
          {ok, "201", _Header, _Body} ->
              ok;
          {ok, "204", _Header, _Body} ->
              ok;
          {ok, Code, _Header, _Body} ->
              {error, {http_error, Code}};
          {error, Reason} ->
  
negative.code: 
  -record(state, { client_id,
                   hosts,
                   bucket,
                   report_fun}).
  
  %% ====================================================================
  %% API
  