1: <?php declare(strict_types=1);
2:
3: namespace Salient\Contract\Http;
4:
5: use Psr\Http\Message\RequestInterface;
6: use Psr\Http\Message\ResponseInterface;
7: use Closure;
8:
9: /**
10: * @api
11: */
12: interface HttpRequestHandlerInterface
13: {
14: /**
15: * Act on a request and generate a response, optionally forwarding the
16: * request to the next handler and acting on its response
17: *
18: * @param Closure(RequestInterface): ResponseInterface $next
19: */
20: public function __invoke(RequestInterface $request, Closure $next): ResponseInterface;
21: }
22: