public static function Utils::getDefaultUserAgent

Get the default User-Agent to add to requests sent through the library

Return value

string

2 calls to Utils::getDefaultUserAgent()
Client::setUserAgent in drupal/core/vendor/guzzle/http/Guzzle/Http/Client.php
Set the name of your application and application version that will be appended to the User-Agent header of all requests.
Request::__construct in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Request.php
Create a new request

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Utils.php, line 39

Class

Utils
HTTP utility class

Namespace

Guzzle\Http

Code

public static function getDefaultUserAgent() {
  if (!self::$userAgent) {
    self::$userAgent = sprintf('Guzzle/%s curl/%s PHP/%s', Version::VERSION, CurlVersion::getInstance()
      ->get('version'), PHP_VERSION);
  }
  return self::$userAgent;
}