You are here

public function Client::send in Lockr 7.3

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 103

Class

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

Namespace

GuzzleHttp

Code

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