code: function makeRequest(url, handler) {
    const xhr = new XMLHttpRequest();
  
    xhr.open('GET', url, true);
    xhr.responseType = handler.type;
  
    xhr.onload = function onLoad(e) {
      if (this.status === 200 || this.status === 0) {
        handler.fn(null, xhr);
        return;
      }
      handler.fn(e, xhr);
    };
    xhr.onerror = function onError(e) {
      handler.fn(e, xhr);
    };
    xhr.send();
  }
docs: Generic request handler