anchor.diff:          }
         }
       });
  -    xhr.onError.listen((_) => completer.completeError(new HttpResult.fromXhr(xhr)));
  +    xhr.onError.listen((_) => completer.completeError(HttpGitException.fromXhr(xhr)));
       String bodySize = (body.size / 1024).toStringAsFixed(2);
       xhr.upload.onProgress.listen((event) {
         // TODO add progress.
  
positive.code:   }
  }
  
  class HttpResult {
    final int status;
    final String statusText;
  
    HttpResult(this.status, this.statusText);
  
    HttpResult.fromXhr(HttpRequest request) :
        status = request.status, statusText = request.statusText;
  
    /**
     * Returns `true` if the status is 401 Unauthorized.
  
negative.code:         if (xhr.status == 200) {
            return completer.complete(xhr.responseText);
          } else {
            completer.completeError(HttpGitException.fromXhr(xhr));
          }
        }
      });
  
      xhr.onError.listen((_) {
        completer.completeError(HttpGitException.fromXhr(xhr));
      });
  
      xhr.onAbort.listen((_) {
        completer.completeError(HttpGitException.fromXhr(xhr));
      });
  
      xhr.send();
  