private function Client::buildUri in Lockr 7.3
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 141
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);
}
return $uri
->getScheme() === '' && $uri
->getHost() !== '' ? $uri
->withScheme('http') : $uri;
}