for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Transmission\HttpClient\Plugin;
use Http\Client\Common\Plugin\Journal;
use Psr\Http\Client\ClientExceptionInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
/**
* A plugin to remember the last response.
*
* @author Tobias Nyholm <[email protected]>
*/
class History implements Journal
{
* @var ResponseInterface
private $lastResponse;
* @return ResponseInterface|null
public function getLastResponse()
return $this->lastResponse;
}
* {@inheritdoc}
public function addSuccess(RequestInterface $request, ResponseInterface $response)
$this->lastResponse = $response;
public function addFailure(RequestInterface $request, ClientExceptionInterface $exception)