You are here

protected function RemoteManager::getHttpClient in Entity Share 8.3

Prepares a client object from the auth plugin.

Parameters

\Drupal\entity_share_client\Entity\RemoteInterface $remote: The remote website on which to perform the request.

Return value

\GuzzleHttp\Client The configured client.

1 call to RemoteManager::getHttpClient()
RemoteManager::request in modules/entity_share_client/src/Service/RemoteManager.php
Performs a HTTP request. Wraps the HTTP client.

File

modules/entity_share_client/src/Service/RemoteManager.php, line 137

Class

RemoteManager
Service to wrap requests logic.

Namespace

Drupal\entity_share_client\Service

Code

protected function getHttpClient(RemoteInterface $remote) {
  $remote_id = $remote
    ->id();
  if (!isset($this->httpClients[$remote_id])) {
    $this->httpClients[$remote_id] = $remote
      ->getHttpClient(self::STANDARD_CLIENT);
  }
  return $this->httpClients[$remote_id];
}