3
namespace GuzzleHttp\Event;
5
use GuzzleHttp\Message\ResponseInterface;
8
* Event object emitted after a request has been completed.
10
* You may change the Response associated with the request using the
11
* intercept() method of the event.
13
class CompleteEvent extends AbstractTransferEvent
16
* Intercept the request and associate a response
18
* @param ResponseInterface $response Response to set
20
public function intercept(ResponseInterface $response)
22
$this->stopPropagation();
23
$this->getTransaction()->setResponse($response);
27
* Get the response of the request
29
* @return ResponseInterface
31
public function getResponse()
33
return $this->getTransaction()->getResponse();