function Client::buildClient
Build the Guzzle client instance.
2 calls to Client::buildClient()
- Client::createWithConfig in vendor/
php-http/ guzzle7-adapter/ src/ Client.php - Factory method to create the Guzzle 7 adapter with custom Guzzle configuration.
- Client::__construct in vendor/
php-http/ guzzle7-adapter/ src/ Client.php
File
-
vendor/
php-http/ guzzle7-adapter/ src/ Client.php, line 61
Class
- Client
- HTTP Adapter for Guzzle 7.
Namespace
Http\Adapter\Guzzle7Code
private static function buildClient(array $config = []) : GuzzleClient {
$handlerStack = new HandlerStack(Utils::chooseHandler());
$handlerStack->push(Middleware::prepareBody(), 'prepare_body');
$config = array_merge([
'handler' => $handlerStack,
], $config);
return new GuzzleClient($config);
}