You are here

protected function JsonapiHelper::getHttpClient in Entity Share 8

Same name and namespace in other branches
  1. 8.2 modules/entity_share_client/src/Service/JsonapiHelper.php \Drupal\entity_share_client\Service\JsonapiHelper::getHttpClient()

Helper function to get the Http Client.

Return value

\GuzzleHttp\Client A HTTP client to request JSONAPI endpoints.

File

modules/entity_share_client/src/Service/JsonapiHelper.php, line 613

Class

JsonapiHelper
Class JsonapiHelper.

Namespace

Drupal\entity_share_client\Service

Code

protected function getHttpClient() {
  if (!$this->httpClient) {
    $this->httpClient = $this->remoteManager
      ->prepareJsonApiClient($this->remote);
  }
  return $this->httpClient;
}