src/Genesis/API/Request.php
protected function buildRequestURL($sub = 'gateway', $path = '', $token = '')
    {
        $protocol = ($this->getApiConfig('protocol')) ? $this->getApiConfig('protocol') : 'https';

        $sub      = \Genesis\Config::getSubDomain($sub);

        $domain   = \Genesis\Config::getEndpoint();

        $port     = ($this->getApiConfig('port')) ? $this->getApiConfig('port') : 443;

        $path     = ($token) ? sprintf('%s/%s/', $path, $token) : $path;

        return sprintf(
            '%s://%s%s:%s/%s',
            $protocol,
            $sub,
            $domain,
            $port,
            $path
        );
    }
protected function buildRequestURL($sub = 'gateway', $path = '', $token = '')
    {
        $protocol = ($this->getApiConfig('protocol')) ? $this->getApiConfig('protocol') : 'https';

        $sub      = \Genesis\Config::getSubDomain($sub);

        $domain   = \Genesis\Config::getEndpoint();

        $port     = ($this->getApiConfig('port')) ? $this->getApiConfig('port') : 443;

        $path     = ($token) ? sprintf('%s/%s/', $path, $token) : $path;

        return sprintf(
            '%s://%s%s:%s/%s',
            $protocol,
            $sub,
            $domain,
            $port,
            $path
        );
    }
protected function buildRequestURL ( $ sub = 'gateway' , $ path = '' , $ token = '' ) { $ protocol = ( $ this -> getApiConfig ( 'protocol' ) ) ? $ this -> getApiConfig ( 'protocol' ) : 'https' ; $ sub = \ Genesis \ Config :: getSubDomain ( $ sub ) ; $ domain = \ Genesis \ Config :: getEndpoint ( ) ; $ port = ( $ this -> getApiConfig ( 'port' ) ) ? $ this -> getApiConfig ( 'port' ) : 443 ; $ path = ( $ token ) ? sprintf ( '%s/%s/' , $ path , $ token ) : $ path ; return sprintf ( '%s://%s%s:%s/%s' , $ protocol , $ sub , $ domain , $ port , $ path ) ; }
Build the complete URL for the request

@param $sub      String   - gateway/wpf etc.
@param $path     String   - path of the current request
@param $token    String   - should we append the token to the end of the url

@return string            - complete URL
Build the complete URL for the request