code: function (url, callback) {
    var xhr = new XMLHttpRequest()
    xhr.open('GET', url, true)
    xhr.setRequestHeader('Content-Type', 'application/json')
    xhr.setRequestHeader('Accept', 'application/json')
  
    xhr.onload = function() {
      if (xhr.status >= 200 && xhr.status < 400) {
        var data = JSON.parse(xhr.responseText)
        callback(data, xhr.status, xhr)
      } else {
        callback(null, xhr.status, xhr)
      }
    }
  
    xhr.onerror = function(e) {
      callback(new Error(e), null, xhr)
    }
  
    xhr.send()
  }
docs: The callback function for getJSON().
  
  @callback xhrCallback
  @param {boolean} success - True on success. False on error.
  @param {Object} data - The parsed data. null if success == false
  @param {XMLHttpRequest} xhr - The request object
  @see getJSON
   
  Runs an Ajax request against a url and calls the callback function with
  the parsed JSON result.
  @param {string} url - The url to request
  @param {xhrCallback} callback - The callback function
  @returns {XMLHttpRequest}