You are here

public function HttpClient::call in HTTP Client Manager 8.2

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

Execute command call.

Parameters

string $commandName: The Guzzle command name.

array $params: The Guzzle command parameters array.

Return value

\GuzzleHttp\Command\ResultInterface The result of the executed command

Throws

\GuzzleHttp\Command\Exception\CommandException

Overrides HttpClientInterface::call

1 call to HttpClient::call()
HttpClient::__call in src/HttpClient.php
Magic method implementation for commands execution.

File

src/HttpClient.php, line 352

Class

HttpClient
The http client.

Namespace

Drupal\http_client_manager

Code

public function call($commandName, array $params = []) {
  $client = $this
    ->getClientByCommand($commandName);
  $command = $client
    ->getCommand($commandName, $params);
  return $client
    ->execute($command);
}