protected static function BaseApiAbstract::initializeHttpClient in TMGMT Translator Smartling 8.2
Same name in this branch
- 8.2 api-sdk-php/src/BaseApiAbstract.php \Smartling\BaseApiAbstract::initializeHttpClient()
- 8.2 vendor/smartling/api-sdk-php/src/BaseApiAbstract.php \Smartling\BaseApiAbstract::initializeHttpClient()
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/src/BaseApiAbstract.php \Smartling\BaseApiAbstract::initializeHttpClient()
- 8.3 vendor/smartling/api-sdk-php/src/BaseApiAbstract.php \Smartling\BaseApiAbstract::initializeHttpClient()
Parameters
string $serviceUrl:
bool $debug:
Return value
File
- api-sdk-php/
src/ BaseApiAbstract.php, line 218
Class
- BaseApiAbstract
- Class BaseApiAbstract
Namespace
SmartlingCode
protected static function initializeHttpClient($serviceUrl, $debug = false) {
$client = new Client([
'base_uri' => $serviceUrl,
'debug' => $debug,
'headers' => [
'User-Agent' => vsprintf('%s/%s %s', [
self::getCurrentClientId(),
self::getCurrentClientVersion(),
GuzzleHttp\default_user_agent(),
]),
],
]);
return $client;
}