onReady = function() {
    if (request.readyState == 4) {
      if (request.status == 200) {
        var jsonObjReceived = null;
        try {
          jsonObjReceived = JSON.parse(request.responseText);
        } catch(e) {
          console.error('Incorrectly formatted JSON data from ' + url);
          throw e;
        }
        cb(jsonObjReceived);
      } else {
        // return a null element which will be dealt with in the front end
        cb(null);
      }
    }
  }
Sends a request to the Ardubloockly Server that returns a JSON response.
@param {!string} url Requestor URL.
@param {!string} method HTTP method.
@param {!string} contentType HTTP content type.
@param {string} jsonObjSend JavaScript object to be parsed into JSON to send.
@param {!function} cb Request callback function, takes a single input for a
    parsed JSON object.