You are here

public function HttpServiceApiWrapperPosts::getHttpClient in HTTP Client Manager 8.2

Get HTTP Client.

Return value

\Drupal\http_client_manager\HttpClientInterface The HTTP Client used to make requests.

Overrides HttpServiceApiWrapperInterface::getHttpClient

File

modules/http_client_manager_example/src/Plugin/HttpServiceApiWrapper/HttpServiceApiWrapperPosts.php, line 18

Class

HttpServiceApiWrapperPosts
Class HttpServiceApiWrapperPosts.

Namespace

Drupal\http_client_manager_example\Plugin\HttpServiceApiWrapper

Code

public function getHttpClient() {
  return $this->httpClientFactory
    ->get('example_services_yaml');
}