function default_user_agent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/guzzle/src/functions.php \GuzzleHttp\default_user_agent()
Get the default User-Agent string to use with Guzzle
Return value
string
1 call to default_user_agent()
- Client::configureDefaults in vendor/
guzzlehttp/ guzzle/ src/ Client.php - Configures the default options for a client.
File
- vendor/
guzzlehttp/ guzzle/ src/ functions.php, line 128
Namespace
GuzzleHttpCode
function default_user_agent() {
static $defaultAgent = '';
if (!$defaultAgent) {
$defaultAgent = 'GuzzleHttp/' . Client::VERSION;
if (extension_loaded('curl') && function_exists('curl_version')) {
$defaultAgent .= ' curl/' . \curl_version()['version'];
}
$defaultAgent .= ' PHP/' . PHP_VERSION;
}
return $defaultAgent;
}