code: function(req, res) {
          var newSession,
              postObj,
              redirectToHost;
  
          try {
              postObj = JSON.parse(req.post);
          } catch (e) {
              // If the parsing has failed, the error is reported at the end
          }
  
          if (typeof(postObj) === "object" &&
              typeof(postObj.desiredCapabilities) === "object") {
              // Create and store a new Session
              newSession = new ghostdriver.Session(postObj.desiredCapabilities);
              _sessions[newSession.getId()] = newSession;
  
              _log.info("_postNewSessionCommand", "New Session Created: " + newSession.getId());
  
              // Return newly created Session Capabilities
              res.success(newSession.getId(), newSession.getCapabilities());
              return;
          }
  
          throw _errors.createInvalidReqMissingCommandParameterEH(req);
      }
docs: private: