You are here

private function HttpClient::createGuzzleClient in HTTP Client Manager 8.2

Create a new Guzzle Client by config.

Parameters

array $config: An array of configurations used to create a new Guzzle Client.

Return value

\GuzzleHttp\Command\Guzzle\GuzzleClient A Guzzle Client instance.

2 calls to HttpClient::createGuzzleClient()
HttpClient::getClientByCommand in src/HttpClient.php
Get Client by Command.
HttpClient::setupGuzzleClient in src/HttpClient.php
Setup Guzzle Client from *.http_services_api.yml files.

File

src/HttpClient.php, line 209

Class

HttpClient
The http client.

Namespace

Drupal\http_client_manager

Code

private function createGuzzleClient(array $config) {
  $client = new Client($config);
  return new GuzzleClient($client, $this
    ->loadServiceDescription($config));
}