A method that set it charge url
@param  string  $uri set the endpoint url
@param  string $sufix a sufix to the cart token
518466
public function setUriCharge( $uri = '',$sufix ='')
	{
		$toSetUri = $uri;
		if(!$uri) {
			$toSetUri = $this->getUriPrefix().'charges';
		}

        if($sufix) {
            $toSetUri .= "/$sufix";
        }

		$this->_uriCharge = $toSetUri;
	}
378484
public function post(string $uri, string $controller, string $action)
    {
        $this->addRoute('POST', $uri, $controller, $action);
    }
457719
public function route($uri = null)
    {
        if ($uri === null) {
            $uri = $this->getAppUri();
        }
        //$uri = ltrim(preg_replace('/^([^&]*)&.*$/', '$1', $uri), '/');
        
        $urlElements = parse_url($uri);
        $uri      = isset($urlElements['path'])     ? $urlElements['path']     : '';
        $query    = isset($urlElements['query'])    ? $urlElements['query']    : null;
        $fragment = isset($urlElements['fragment']) ? $urlElements['fragment'] : null;
        $urlTab = explode('/', trim($uri, ' /'));
        $request = Container::getRequest();
        $request->setUri($uri);
        $request->setBaseUrl($this->getBaseUrl());
        $controller = array_shift($urlTab);
        $action = array_shift($urlTab);
        $request->setController($controller ? $controller : self::DEFAULT_CONTROLLER);
        $request->setAction($action ? $action : self::DEFAULT_ACTION);
        while (count($urlTab)) {
            $key = trim(array_shift($urlTab));
            $value = array_shift($urlTab);
            if ($value !== null) {
                $request->setParam($key, $value);
            }
        }
        if ($query !== null) {
            $params = null;
            parse_str($query, $params);
            foreach ($params as $key => $value) {
                $request->setParam($key, $value);
            }
        }
        
        return $this;
    }
916196
public function setBaseUri($baseUri)
    {
        if (is_string($baseUri)) {
            $baseUri = new Uri($baseUri);
        }

        $this->attributes[self::ATTRIBUTE_BASE_URI] = $baseUri;
    }
34738
public function hasEndpoint($uri)
    {
        /** @var ArrayCollection $urlsFound */
        $urlsFound = $this->getEndpoints()->filter(function (Endpoint $endpoint) use ($uri) {
            // return when URI and URI string are equal
            return (string) $endpoint->getUri() === $uri;
        });

        return $urlsFound->isEmpty() === false;
    }
1153039
public function setUseURI(string $use_uri = "N") : CNabuDataObject
    {
        if ($use_uri === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$use_uri")
            );
        }
        $this->setValue('nb_site_map_use_uri', $use_uri);
        
        return $this;
    }
610442
public function callStaticRoute($uri)
    {
        $params = array_slice($this->getUrlSegments(), 2);

        return $this->callController([$uri, $params]);
    }
964424
public function setUri($uri)
    {
        if (is_string($uri)) {
            $uri = Zend_Uri::factory($uri);
        }

        if (!$uri instanceof Zend_Uri_Http) {
            /**
 * @see Zend_Http_Client_Exception 
*/
            include_once 'Zend/Http/Client/Exception.php';
            throw new Zend_Http_Client_Exception('Passed parameter is not a valid HTTP URI.');
        }

        // We have no ports, set the defaults
        if (! $uri->getPort()) {
            $uri->setPort(($uri->getScheme() == 'https' ? 443 : 80));
        }

        $this->uri = $uri;

        return $this;
    }
482348
public function setUri($uri)
    {
        if (!is_array($uri)) {
            $uri = parse_url($uri);
        }

        $this->uri = $uri;
        return $this;
    }
853486
public void setURI( URI uri )
    {

        if ( uri == null )
        {
            setScheme( null );
            setUserInfo( null );
            setHost( null );
            setPort( UNDEFINED_PORT );
            setPath( null );
            setQuery( null );
            setFragment( null );
        }
        else if ( uri.isOpaque() )
        {
            setUserInfo( null );
            setHost( null );
            setPort( UNDEFINED_PORT );
            setPath( null );
            setQuery( null );
            setOpaque( uri.getScheme(), uri.getSchemeSpecificPart() );
            setFragment( uri.getRawFragment() );
        }
        else
        {
            setSchemeSpecificPart( null );
            setScheme( uri.getScheme() );
            setUserInfo( uri.getRawUserInfo() );
            setHost( uri.getHost() );
            setPort( uri.getPort() );
            setPath( uri.getRawPath() );
            setQuery( uri.getRawQuery() );
            setFragment( uri.getRawFragment() );
        }
    }
1168762
public function post($uri, AbstractRequest $request = null)
    {
        $http = $this->getHttpClone();

        $http->setOption(CURLOPT_POST, true);
        $http->setOption(CURLOPT_URL, $uri);
        if ($request) {
            $http->setOption(CURLOPT_POSTFIELDS, $this->buildPostData($request->getQuery()));
        }

        return $http->execute();
    }
696691
public function setUri($uri)
    {
        if (null === $uri) {
            $uri = 'amqp://guest:guest@localhost:5672/';
        }
        $this->uri = parse_url($uri);
        if (($this->uri['scheme'] != 'amqp' && $this->uri['scheme'] != 'amqps')) {
            throw new \UnexpectedValueException(
                sprintf(
                    'a valid URI scheme is request expected format [%s] ' .
                        'received: [%s]', 'tcp://user:pass@host:port/vhost',
                    $uri
                )
            );
        }
        if (empty($this->uri['user']) || empty($this->uri['pass'])) {
            throw new \RuntimeException(
                'AMQPLAIN Auth requires both a user and pass be specified'
            );
        }
        if ($this->uri['scheme'] === 'amqps') {
            if (!extension_loaded('openssl')) {
                throw new \RuntimeException(
                    'SSL connection attempted however openssl extension is not loaded'
                );
            }
            $ssl_context = stream_context_create();
            foreach ($this->options['ssl_options'] as $k => $v) {
                stream_context_set_option($ssl_context, 'ssl', $k, $v);
            }
        }
        return $this;
    }
263202
private function setRequestURI()
    {

        if (!isset($_SERVER['REQUEST_URI']) || !isset($_SERVER['SCRIPT_NAME']))
        {
            $this->request_uri = '';
        }
        else
        {

            $uri = $_SERVER['REQUEST_URI'];
            $script = $_SERVER['SCRIPT_NAME'];

            if (strpos($uri, $script) === 0)
            {
                $uri = substr($uri, strlen($script));
            }
            elseif (strpos($uri, dirname($script)) === 0)
            {
                $uri = substr($uri, strlen(dirname($script)));
            }

            if (strncmp($uri, '?/', 2) === 0)
            {
                $uri = substr($uri, 2);
            }

            $parts = preg_split('#\?#i', $uri, 2);
            $uri = $parts[0];

            if ($uri == '/' || empty($uri))
            {
                $this->request_uri = '';
            }

            $uri = parse_url($uri, PHP_URL_PATH);
            $this->request_uri = str_replace(array('//', '../'), '/', trim($uri, '/'));
        }
    }
1319781
public function visit($uri)
    {
        $this->currentPage = $this->prepareUrl($uri);

        $this->makeRequest('GET', $this->currentPage);

        return $this;
    }
926776
public function setUriToken($uri = null)
	{
		$toSetUri = $uri;
		if(!$uri) {
			$toSetUri = $this->getUriPrefix().'tokens';
		}

		$this->_uriToken = $toSetUri;
	}
784094
public function setBaseUrl($uri)
    {
        if (is_string($uri)) {
            $this->baseUrl = Uri::createFromString($uri);
        } else {
            $this->baseUrl = $uri;
        }
        return $this;
    }
140491
@Override
    public void setRequestURI(byte[] uri) {

        if (null == uri || 0 == uri.length) {
            throw new IllegalArgumentException("setRequestURI: null input");
        }
        super.setFirstLineChanged();

        if ('*' == uri[0]) {
            // URI of "*" can only be one character long to be valid
            if (1 != uri.length && '?' != uri[1]) {
                String value = GenericUtils.getEnglishString(uri);
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "setRequestURI: invalid uri [" + value + "]");
                }
                throw new IllegalArgumentException("Invalid uri: " + value);
            }
        } else if ('/' != uri[0]) {
            String value = GenericUtils.getEnglishString(uri);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "setRequestURI: invalid uri [" + value + "]");
            }
            throw new IllegalArgumentException("Invalid uri: " + value);
        }

        initScheme();
        this.myURIString = null;
        this.sUrlHost = null;
        this.iUrlPort = HeaderStorage.NOTSET;
        this.myQueryBytes = null;
        this.queryParams = null;
        parseURI(uri, 0);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "setRequestURI: set URI to " + getRequestURI());
        }
    }