Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Client.php

function Client::__call

Parameters

string $method:

array $args:

Return value

PromiseInterface|ResponseInterface

Deprecated

Client::__call will be removed in guzzlehttp/guzzle:8.0.

File

vendor/guzzlehttp/guzzle/src/Client.php, line 81

Class

Client
@final

Namespace

GuzzleHttp

Code

public function __call($method, $args) {
    if (\count($args) < 1) {
        throw new InvalidArgumentException('Magic request methods require a URI and optional options array');
    }
    $uri = $args[0];
    $opts = $args[1] ?? [];
    return \substr($method, -5) === 'Async' ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts) : $this->request($method, $uri, $opts);
}
RSS feed
Powered by Drupal