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
GuzzleHttpCode
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);
}