You are here

public function Client::send in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/guzzle/src/Client.php \GuzzleHttp\Client::send()

Send an HTTP request.

Parameters

RequestInterface $request Request to send:

array $options Request options to apply to the given: request and to the transfer.

Return value

ResponseInterface

Throws

GuzzleException

Overrides ClientInterface::send

File

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

Class

Client
@method ResponseInterface get($uri, array $options = []) @method ResponseInterface head($uri, array $options = []) @method ResponseInterface put($uri, array $options = []) @method ResponseInterface post($uri, array $options = []) @method…

Namespace

GuzzleHttp

Code

public function send(RequestInterface $request, array $options = []) {
  $options[RequestOptions::SYNCHRONOUS] = true;
  return $this
    ->sendAsync($request, $options)
    ->wait();
}