Internal function used to build the request URL
@param {Object} requestObject the request object - see. RequestObject bean
@param {Object} session session corresponding to the request (paramName and id)
@return {String} the url
777291
function (requestObject, session) {
            var typeUtils = ariaUtilsType;
            var urlService = requestObject.urlService;
            if (!urlService) {
                // If no service is set , it takes from app environment
                urlService = this.__getUrlService();
            }
            this.$assert(434, urlService != null);

            // If not specified the session is the one stored on this
            if (!session) {
                session = this.session;
            }

            // Replace dots by forward slashes in the moduleName passed to actual URL creator
            var moduleName = requestObject.moduleName.replace(/\./g, '\/');

            var url;
            if (typeUtils.isString(requestObject.actionName)) { // We accept also empty strings.
                // If in 'action name' mode

                /* The actionName from the request object can contain url parameters, this has to handled separately and not
                 * by the request interface. */
                var actionSplit = this.__extractActionName(requestObject.actionName);

                // Let the implementation compute the URL
                url = urlService.createActionUrl(moduleName, actionSplit.name, session.id);

            } else if (requestObject.serviceSpec) {
                /* using the 'service specification' mode. No particular URL parameters handling
                 * here, all is under UrlService responsibility */
                url = urlService.createServiceUrl(moduleName, requestObject.serviceSpec, session.id);

            } else {
                // error : one of serviceSpec or actionName must be present
                this.$logError(this.MISSING_SERVICESPEC, [url]);
                return null;
            }

            if (!url || (typeUtils.isObject(url) && !url.url)) {
                this.$logError(this.INVALID_BASEURL, [url]);
                return null;
            }
            if (typeUtils.isString(url)) {
                // if raw string returned, convert it in structured request here
                url = {
                    url : url
                };
            }

            // if not specified, assume POST method (backward-compatibility)
            if (!url.method) {
                url.method = "POST";
            }

            if (requestObject.actionName) {
                // If in 'action name' mode, add the action parameters
                url.url = this.__appendActionParameters(url.url, actionSplit.params);
            }
            // Add the global parameters
            url.url = this.__appendGlobalParams(url.url, this._params);

            return url;
        }
1352067
public Cookie getSessionCookie(HttpSession session,boolean requestIsSecure)
    {
        if (_handler.isUsingCookies())
        {
            Cookie cookie = _handler.getSessionManager().getHttpOnly()
                ?new HttpOnlyCookie(SessionManager.__SessionCookie,session.getId())
                :new Cookie(SessionManager.__SessionCookie,session.getId());    
            String domain=_handler.getServletContext().getInitParameter(SessionManager.__SessionDomain);
            String maxAge=_handler.getServletContext().getInitParameter(SessionManager.__MaxAge);
            String path=_handler.getServletContext().getInitParameter(SessionManager.__SessionPath);
            if (path==null)
                path=getCrossContextSessionIDs()?"/":_handler.getHttpContext().getContextPath();
            if (path==null || path.length()==0)
                path="/";
            
            if (domain!=null)
                cookie.setDomain(domain);       
            if (maxAge!=null)
                cookie.setMaxAge(Integer.parseInt(maxAge));
            else
                cookie.setMaxAge(-1);
            
            cookie.setSecure(requestIsSecure && getSecureCookies());
            cookie.setPath(path);
            
            return cookie;    
        }
        return null;
    }
154741
function buildLoginUrl(connectionConfig)
{
  var queryParams =
  [
    { name: 'warehouse',    value: connectionConfig.getWarehouse() },
    { name: 'databaseName', value: connectionConfig.getDatabase() },
    { name: 'schemaName',   value: connectionConfig.getSchema() },
    { name: 'roleName',     value: connectionConfig.getRole() }
  ];

  var queryStringObject = {};
  for (var index = 0, length = queryParams.length; index < length; index++)
  {
    var queryParam = queryParams[index];
    if (Util.string.isNotNullOrEmpty(queryParam.value))
    {
      queryStringObject[queryParam.name] = queryParam.value;
    }
  }

  return Url.format(
  {
    pathname : '/session/v1/login-request',
    search   : QueryString.stringify(queryStringObject)
  });
}
780610
def _get_url(self, session, uri):
        
        url = session.url
        if uri:
            slash = '' if uri.startswith('/') else '/'
            url = "%s%s%s" % (session.url, slash, uri)
        return url
689796
function UrlNode(data){
    this.append = function(next){
        this.next = next;
    };
    this.getData = function(){
        return this.data;
    };
    this.setData = function(data){
        this.data = data;
    }
    this.getNext = function(){
        return this.next;
    };
    this.setParams = function(params){
        var queryParameters = params.split("&");
        if(queryParameters != null){
            this.params = [];
            for(var counter = 0; counter < queryParameters.length; counter++) {
                var keyValuePair = queryParameters[counter].split("=");
                this.params[keyValuePair[0]] = keyValuePair[1];
            }
        } else{
            queryParameters = null;
        }
    };
    this.getParams = function(){
        return this.params;
    };

    //set var's for this object
    var queryParamSplit = data.split("?");
    this.params = null;
    this.data = null;
    this.next = null;
    if(queryParamSplit != null && queryParamSplit.length > 1){
        this.setData(queryParamSplit[0]);
        this.setParams(queryParamSplit[1]);
    } else{
        this.setData(data);
    }
}
704117
public String getRequestedSessionIdFromURL(ServletRequest request, boolean force) {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[GET_REQUESTED_SESSION_ID_FROM_URL],"force="+force);
        }
        String sessionID = null;
        if (_smc.getEnableUrlRewriting() || force) {
            String requestURI = ((IExtendedRequest) request).getEncodedRequestURI();
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[GET_REQUESTED_SESSION_ID_FROM_URL], "request uri:" + requestURI);
            }
            int prefix = requestURI.indexOf(_smc.getSessUrlRewritePrefix());
            if (prefix != -1) {
                int sessionIDstart = requestURI.indexOf("=", prefix + 1);
                int i = requestURI.indexOf(";", prefix + 1);
                int j = requestURI.indexOf("?", prefix + 1);
                int postfix = -1;
                if (i == -1) {
                    postfix = j;
                } else if (j == -1) {
                    postfix = i;
                } else
                    postfix = (i > j) ? j : i;

                if (postfix != -1) {
                    sessionID = requestURI.substring(sessionIDstart + 1, postfix);
                } else {
                    sessionID = requestURI.substring(sessionIDstart + 1);
                }
            }
        }
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[GET_REQUESTED_SESSION_ID_FROM_URL], sessionID);
        }
        return sessionID;
    }
461204
function(callback) {
            var that = this;
            var url = this.paths.login;
            var params = {
                username: this.username,
                password: this.password,
                cookie  : '1'
            };

            callback = callback || function() {};
            var wrappedCallback = function(err, response) {
                // Let's make sure that not only did the request succeed, but
                // we actually got a non-empty session key back.
                var hasSessionKey = !!(!err && response.data && response.data.sessionKey);

                if (err || !hasSessionKey) {
                    callback(err || "No session key available", false);
                }
                else {
                    that.sessionKey = response.data.sessionKey;
                    callback(null, true);
                }
            };

            return this.http.post(
                this.urlify(url),
                this._headers(),
                params,
                this.timeout,
                wrappedCallback
            );
        }
516164
function getQueryObj(query='') {
  const qObj = {};
  const pairs = (query[0] === '?' ? query.substr(1) : query).split('&');
  for (let i = 0, j = pairs.length; i < j; i++) {
    let pair = pairs[i].split('=');
    qObj[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || '');
  }
  return qObj;
}
336675
function (sessionUrl) {
    console.log('app.js: Getting the remote session.');
    var request = new window.XMLHttpRequest();

    request.addEventListener('progress', updateProgress);
    request.addEventListener('load', transferComplete);
    request.addEventListener('error', transferFailed);
    request.addEventListener('abort', transferCanceled);

    request.open('GET', sessionUrl, true);
    request.responseType = 'json';

    function updateProgress (evt) {
      if (evt.lengthComputable) {
        var percentComplete = evt.loaded / evt.total;
        console.log('progress:', percentComplete);
        app.message({
          text: 'Progress: ' + percentComplete,
          type: 'ok'
        });
      }
    }

    function transferComplete (evt) {
      console.log('The transfer is complete.');
      app.message({
        text: 'Remote session was downloaded succesfully.',
        type: 'ok'
      });
      app.loadSessionBlob(request.response);
    }

    function transferFailed (evt) {
      console.log('An error occurred while transferring the file.');
      app.message({
        text: 'Remote session download problem.',
        type: 'error'
      });
    }

    function transferCanceled (evt) {
      console.log('The transfer has been canceled by the user.');
    }

    request.send();
  }
2885
@Override
    public Object createSession(ServletRequest req, ServletResponse res, SessionAffinityContext sac, boolean reuseTheId) {
        String id = _sam.getInUseSessionID(req, sac);
        int version = _sam.getInUseSessionVersion(req, sac); // sac.getRequestedSessionVersion();
        ISession isess = createISession(id, version, reuseTheId);
        return adaptAndSetCookie(req, res, sac, isess);
    }
736497
public static String url(PMSession session, String url) {
        return url(session, url, false);
    }
1189473
function buildQuery(requestQuery) {
        var queries = {};
        if (typeof requestQuery !== 'object')
            return queries;
        var searchString = sanitize(_u.isObject(requestQuery.search) ? requestQuery.search.value : '');
        self.oRequestQuery = requestQuery;
        var useStmt = buildSetDatabaseOrSchemaStatement();
        if (useStmt) {
            queries.changeDatabaseOrSchema = useStmt;
        }
        queries.recordsTotal = buildCountStatement(requestQuery);
        if (searchString) {
            queries.recordsFiltered = buildCountStatement(requestQuery);
        }
        var query = buildSelectPartial();
        query += buildWherePartial(requestQuery);
        query += buildGroupByPartial();
        query += buildOrderingPartial(requestQuery);
        query += buildLimitPartial(requestQuery);
        if (self.dbType === 'oracle'){
            var start = parseInt(requestQuery.start, 10);
            var len = parseInt(requestQuery.length, 10);
            if (len >= 0 && start >= 0) {
                query = 'SELECT * FROM (SELECT a.*, ROWNUM rnum FROM (' + query + ') ';
                query += 'a)' + ' WHERE rnum BETWEEN ' + (start + 1) + ' AND ' + (start + len);
            }
        }
        queries.select = query;
        return queries;
    }
168873
private String getRequestUrl(RequestParametersHolder requestHolder) throws AlipayApiException {
        StringBuffer urlSb = new StringBuffer(serverUrl);
        try {
            String sysMustQuery = WebUtils.buildQuery(requestHolder.getProtocalMustParams(),
                charset);
            String sysOptQuery = WebUtils.buildQuery(requestHolder.getProtocalOptParams(), charset);

            urlSb.append("?");
            urlSb.append(sysMustQuery);
            if (sysOptQuery != null & sysOptQuery.length() > 0) {
                urlSb.append("&");
                urlSb.append(sysOptQuery);
            }
        } catch (IOException e) {
            throw new AlipayApiException(e);
        }

        return urlSb.toString();
    }
1268125
function Url(obj){
    this._id = obj && obj.id;
    this._tag = obj && obj.tag;
    this._url = obj && obj.url;
}
69698
def request(request_name, options={}, &params)
      if options[:api_version].nil? && @default_options[:api_version]
        options[:api_version] = @default_options[:api_version]
      end

      session_data = options[:session_data] || default_session_data

      raise SessionDataNotProvidedError.new(@service, request_name) unless session_data

      [:base_url].each do |k|
        session_data[k] = options[k] if options[k]
      end

      request_class = provider_module.find_request(service, request_name, session_data, options)

      raise UnknownRequestError.new(request_name, options) unless request_class

      # Always use :params over &params if provided
      if options[:params]
        params = lambda do |params|
          options[:params].each do |key, value|
            begin
              params[key] = value
            rescue NameError => e
              raise NameError.new("Unknown param name '#{key}'")
            end
          end
        end
      end

      request  = request_class.new(session_data, &params)

      response = http_connection.send(request.http_method) do |r|
        r.url        request.url
        r.headers.merge!(request.headers)        if request.headers?
        r.query    = request.querystring         if request.querystring?
        r.body     = JSON.generate(request.body) if request.body?
      end

      Aviator::Response.send(:new, response, request)
    end
1353283
public static String getUrlWithoutSessionId(String url, String sessionIdName) {

        if (isSessionEncodedInUrl(url, sessionIdName)) {
            return url.substring(0, url.indexOf(getSessionIdSubstring(sessionIdName)));
        }
        return url;
    }
236471
function() {
          var url;
          if (this.get('sql_api_template')) {
            url = this.get("sql_api_template").replace('{user}', this.get('user_name'));
          } else {
            url = this.get('sql_api_protocol') + '://' +
              this.get('user_name') + '.' +
              this.get('sql_api_domain') + ':' +
              this.get('sql_api_port');
          }
          return url;
        }