code: function (key, cfg) {
              this.log("dropState");
              var requestParams,
                  requestCfg,
                  requestHeaders;
  
              requestHeaders = cfg.requestHeaders || {};
  
              requestParams = {
                  activityId: cfg.activity.id
              };
              if (this.version === "0.9") {
                  requestParams.actor = JSON.stringify(cfg.agent.asVersion(this.version));
              }
              else {
                  requestParams.agent = JSON.stringify(cfg.agent.asVersion(this.version));
              }
              if (key !== null) {
                  requestParams.stateId = key;
              }
              if ((typeof cfg.registration !== "undefined") && (cfg.registration !== null)) {
                  if (this.version === "0.9") {
                      requestParams.registrationId = cfg.registration;
                  }
                  else {
                      requestParams.registration = cfg.registration;
                  }
              }
  
              requestCfg = {
                  url: "activities/state",
                  method: "DELETE",
                  params: requestParams,
                  headers: requestHeaders
              };
  
              if (typeof cfg.callback !== "undefined") {
                  requestCfg.callback = cfg.callback;
              }
  
              return this.sendRequest(requestCfg);
          }
docs: Drop a state value or all of the state, when used from a browser sends to the endpoint using the RESTful interface.
  
  @method dropState
  @param {String|null} key Key of state to delete, or null for all
  @param {Object} cfg Configuration options
  @param {TinCan.Activity} cfg.activity Activity in document identifier
  @param {TinCan.Agent} cfg.agent Agent in document identifier
  @param {String} [cfg.registration] Registration
  @param {Function} [cfg.callback] Callback to execute on completion
  @param {Object} [cfg.requestHeaders] Optional object containing additional headers to add to request