@param string      $url
@param string|null $authentication

@return string
173748
private function sendCurlRequest($url, $authentication = null)
    {
        $handle = curl_init($url);

        curl_setopt_array($handle, array_replace($this->options, array(
            CURLOPT_HEADER => false,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_FAILONERROR => true,
        )));

        if (null !== $authentication) {
            curl_setopt($handle, CURLOPT_USERPWD, $authentication);
        }

        $result = curl_exec($handle);

        if (curl_errno($handle)) {
            $error = curl_error($handle);
            curl_close($handle);

            throw new \RuntimeException(sprintf('Curl error reading "%s": %s', $url, $error));
        }

        curl_close($handle);

        return $result;
    }
636759
public function get(String $url = NULL)
    {
        $response = $this->curl
                         ->init($this->url ?? $url)
                         ->option('returntransfer', true)
                         ->option('ssl_verifypeer', $this->sslVerifyPeer)
                         ->exec();

        return $this->_result($response);
    }
857725
function buildSecureNginxServer($url)
    {
        $path = $this->certificatesPath();

        return str_replace(
            ['VALET_HOME_PATH', 'VALET_SERVER_PATH', 'VALET_STATIC_PREFIX', 'VALET_SITE', 'VALET_CERT', 'VALET_KEY'],
            [VALET_HOME_PATH, VALET_SERVER_PATH, VALET_STATIC_PREFIX, $url, $path.'/'.$url.'.crt', $path.'/'.$url.'.key'],
            $this->files->get(__DIR__.'/../stubs/secure.valet.conf')
        );
    }
643210
public function absUrl($uri, $secure = null)
    {

        $source = $this->url($uri, $secure);

        if(substr($source, 0, 7)=='/public') $source = substr($source, 7);

        return url($source);
    }
516224
public function authenticate(string $credential, string $password = null): ?UserInterface
    {
        $user = $this->users->read($credential);

        if ($user) {
            if ($password && !$this->verifyPassword($user, $password)) {
                return null;
            }

            return ($this->userFactory)(
                $this->users->getIdentifier(),
                $this->getRoles($credential),
                $this->getDetails($user)
            );
        }

        return null;
    }
959278
public static function authorizeUrl($params = null)
    {
        if (!$params) {
            $params = array();
        }

        $params['client_id'] = self::_getConnectParam('client_id', $params);
        $params['redirect_uri'] = self::_getConnectParam('redirect_uri', $params);
        if (!array_key_exists('response_type', $params)) {
            $params['response_type'] = 'code';
        }
        $query = Util\Util::urlEncode($params);

        return Sumup::$connectBase . '/authorize?' . $query;
    }
950164
public function getOutUrl($ssl = null, $admin = null, $nativeImg = false)
    {
        $ssl = is_null($ssl) ? $this->isSsl() : $ssl;
        $admin = is_null($admin) ? $this->isAdmin() : $admin;

        if ($ssl) {
            if ($nativeImg && !$admin) {
                $url = $this->getSslShopUrl();
            } else {
                $url = $this->getConfigParam('sSSLShopURL');
                if (!$url && $admin) {
                    $url = $this->getConfigParam('sAdminSSLURL') . '../';
                }
            }
        } else {
            $url = ($nativeImg && !$admin) ? $this->getShopUrl() : $this->getConfigParam('sShopURL');
        }

        return $url . $this->_sOutDir . '/';
    }
407020
public function queryString($url = null)
    {
        $query = '';

        if (!$url)
        {
            $url = $this->server('request_uri');
        }

        $position = mb_strpos($url, '?');

        if ($position !== false)
        {
            $query = mb_substr($url, $position + 1);
        }

        return $query;
    }
454699
public static function getPageAuthority($url = false)
    {
        $data = static::getCols('34359738368', $url);
        return (parent::noDataDefaultValue() == $data) ? $data :
            $data['upa'];
    }
293057
public function toHeader($realm = null)
    {
        $first = true;
        if ($realm) {
            $out = 'Authorization: OAuth realm="' . OAuthUtil::urlencodeRfc3986($realm) . '"';
            $first = false;
        } else {
            $out = 'Authorization: OAuth';
        }
        
        foreach ($this->parameters as $k => $v) {
            if (substr($k, 0, 5) != "oauth") {
                continue;
            }
            if (is_array($v)) {
                throw new OAuthException('Arrays not supported in headers');
            }
            $out .= ($first) ? ' ' : ',';
            $out .= OAuthUtil::urlencodeRfc3986($k) .
                '="' .
                OAuthUtil::urlencodeRfc3986($v) .
                '"';
            $first = false;
        }
        
        return $out;
    }
52400
public function getWsdlUrl(CertificationBag $certificationBag, $url = null)
    {
        if ($url) {
            return $url;
        }

        if ($certificationBag->getEnvironment() == CertificationBag::PRODUCTION) {
            return static::PRODUCTION_WSDL;
        }

        return static::INTEGRATION_WSDL;
    }
1055662
public function to($url, $locale = null, $parameters = [], $secure = null)
    {
        if (is_bool($secure)) {
            $this->urlparser->secure($secure);
        } elseif ($this->forceSecure) {
            $this->urlparser->secure();
        }

        return $this->urlparser->set($url)
            ->localize($this->scope->segment($locale), $this->scope->locales())
            ->parameters($parameters)
            ->get();
    }
13075
public function formatCamoUrl($domain, $digest, $url)
    {
        return 'https://' . $domain . '/' . $digest . '?url=' . $this->encoder->encode($url);
    }
105457
public function signUrl($url)
    {
        if (strrpos($url, '?') === false) {
            // append ? if one doesn't exist
            $url .= '?';
        }
        return sprintf('%s&policy=%s&signature=%s',
            $url, $this->policy, $this->signature);
    }
882314
public static String usingAuthentication(String url) {
        if (authenticationTypes.BASIC.toString().equals(getInstance().authenticationType)) {
            return url.replace("://", "://" + getLogin() + ":" + getPassword() + "@");
        }
        return url;

    }
456711
private String formatUrl(String imageUrl) {
		if (useProxy || null != authentication || useCache) {
			String token = securityContext.getToken();
			if (null != token) {
				StringBuilder url = new StringBuilder(imageUrl);
				int pos = url.lastIndexOf("?");
				if (pos > 0) {
					url.append("&");
				} else {
					url.append("?");
				}
				url.append("userToken=");
				url.append(token);
				return url.toString();
			}
		}
		return imageUrl;
	}
505130
public static function getDomainAuthority($url = false)
    {
        $data = static::getCols('68719476736', Helper\Url::parseHost($url));
        return (parent::noDataDefaultValue() == $data) ? $data :
            $data['pda'];
    }