function request(url, callback) {
    var xhr = new XMLHttpRequest()
    xhr.onload = callback
    xhr.onerror = callback
    try {
      xhr.open('GET', url, true)
    } catch (e) {
      callback.call(xhr, e)
      return
    }
    xhr.send()
  }
Request helper function.

@param {string} url URL to request
@param {Function} callback Request callback