/** * Convenience wrapper to publishes the request, while proxying any response Wildfire headers * * @param GuzzleHttp\Event\EndEvent $event * @param float $timing */ public function run(EndEvent $event, $timing) { $response = $event->getResponse(); $this->publishRequest($event->getRequest(), $response, $timing); $this->proxyResponseHeaders($response); }
/** * Manage the event emitted when a request transaction has ended. * * @param EndEvent $event Event emitted. */ public function onEnd(EndEvent $event) { $response = $event->getResponse(); $data = ['total' => $event->getTransferInfo('total_time'), 'connection' => $event->getTransferInfo('connect_time')]; $this->storage->attach($response, $data); }