code: function ajax(url, options, callback) {
          if (typeof options === 'function') {
            callback = options;
            options = {};
          }
          callback = callback || function () {};
          var xhr = new XMLHttpRequest();
          xhr.onload = function () {
            if (xhr.status >= 400) {
              return callback(new Error(xhr.responseText || xhr.statusText));
            }
            try {
              return callback(null, JSON.parse(xhr.responseText));
            } catch (e) {
              return callback(new Error('invalid_response'));
            }
          };
          xhr.onerror = function (err) {
            return callback(err);
          };
          xhr.open('GET', url);
          xhr.send();
        }
docs: XHR HTTP Requests
  
  @param {string} url
  @param {object} options
  @param {Function} callback