You are here

private function HttpClient::setupGuzzleClient in HTTP Client Manager 8

Same name and namespace in other branches
  1. 8.2 src/HttpClient.php \Drupal\http_client_manager\HttpClient::setupGuzzleClient()

Setup Guzzle Client from *.http_services_api.yml files.

1 call to HttpClient::setupGuzzleClient()
HttpClient::getClient in src/HttpClient.php
Get Client.

File

src/HttpClient.php, line 87

Class

HttpClient

Namespace

Drupal\http_client_manager

Code

private function setupGuzzleClient() {
  $api = $this
    ->getApi();
  $this->client = new Client($api['base_url'], $api['config']);
  $this->client
    ->setDescription(ServiceDescription::factory($api['source']));
  $this->client
    ->setEventDispatcher($this->eventDispatcher);
}