$clone =
clone $this;
$clone->client =
$clone->client->
withOptions($options);
return $clone;
} public function sendRequest(RequestInterface
$request): Psr7ResponseInterface
{ try { return $this->waitLoop->
createPsr7Response($this->
sendPsr7Request($request));
} catch (TransportExceptionInterface
$e) { throw new NetworkException($e->
getMessage(),
$request,
$e);
} } public function sendAsyncRequest(RequestInterface
$request): HttplugPromise
{ if (!
$promisePool =
$this->promisePool
) { throw new \
LogicException(sprintf('You cannot use "%s()" as the "guzzlehttp/promises" package is not installed. Try running "composer require guzzlehttp/promises".', __METHOD__
));
} try { $response =
$this->
sendPsr7Request($request, true
);
}