private function Client::buildUri in Auth0 Single Sign On 8.2
Parameters
string|null $uri:
Return value
2 calls to Client::buildUri()
- Client::requestAsync in vendor/
guzzlehttp/ guzzle/ src/ Client.php - Create and send an asynchronous HTTP request.
- Client::sendAsync in vendor/
guzzlehttp/ guzzle/ src/ Client.php - Asynchronously send an HTTP request.
File
- vendor/
guzzlehttp/ guzzle/ src/ Client.php, line 208
Class
- Client
- @method ResponseInterface get(string|UriInterface $uri, array $options = []) @method ResponseInterface head(string|UriInterface $uri, array $options = []) @method ResponseInterface put(string|UriInterface $uri, array $options = []) @method…
Namespace
GuzzleHttpCode
private function buildUri($uri, array $config) {
// for BC we accept null which would otherwise fail in uri_for
$uri = Psr7\uri_for($uri === null ? '' : $uri);
if (isset($config['base_uri'])) {
$uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
}
if (isset($config['idn_conversion']) && $config['idn_conversion'] !== false) {
$idnOptions = $config['idn_conversion'] === true ? IDNA_DEFAULT : $config['idn_conversion'];
$uri = Utils::idnUriConvert($uri, $idnOptions);
}
return $uri
->getScheme() === '' && $uri
->getHost() !== '' ? $uri
->withScheme('http') : $uri;
}