text: /*globals qq, XMLHttpRequest*/
  /**
   * Thin module used to send GET requests to the server, expecting information about session
   * data used to initialize an uploader instance.
   *
   * @param spec Various options used to influence the associated request.
   * @constructor
   */
  qq.SessionAjaxRequester = function(spec) {
      "use strict";
  
      var requester,
          options = {
              endpoint: null,
              customHeaders: {},
              params: {},
              cors: {
                  expected: false,
                  sendCredentials: false
              },
              onComplete: function(response, success, xhrOrXdr) {},
              log: function(str, level) {}
          };
  
      qq.extend(options, spec);
  
      function onComplete(id, xhrOrXdr, isError) {
          var response = null;
  
          /* jshint eqnull:true */
          if (xhrOrXdr.responseText != null) {
              try {
                  response = qq.parseJson(xhrOrXdr.responseText);
              }
              catch (err) {
                  options.log("Problem parsing session response: " + err.message, "error");
                  isError = true;
              }
          }
  
          options.onComplete(response, !isError, xhrOrXdr);
      }
  
      requester = qq.extend(this, new qq.AjaxRequester({
          acceptHeader: "application/json",
          validMethods: ["GET"],
          method: "GET",
          endpointStore: {
              get: function() {
                  return options.endpoint;
              }
          },
          customHeaders: options.customHeaders,
          log: options.log,
          onComplete: onComplete,
          cors: options.cors
      }));
  
      qq.extend(this, {
          queryServer: function() {
              var params = qq.extend({}, options.params);
  
              options.log("Session query request.");
  
              requester.initTransport("sessionRefresh")
                  .withParams(params)
                  .withCacheBuster()
                  .send();
          }
      });
  };
  