From ff6fe7f3d043af84b7b20e26b080c77831d5e17b Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Mon, 12 Feb 2024 19:11:15 +1000 Subject: [PATCH] Update readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index bccffdc..3a39442 100644 --- a/README.md +++ b/README.md @@ -304,6 +304,9 @@ LazyJsonPages::globalMiddleware('fire_events', $fireEvents); Sometimes writing Guzzle middleware might be cumbersome, alternatively Lazy JSON Pages provides convenient methods to fire callbacks when sending a request, receiving a response or dealing with a transaction error: ```php +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; + LazyJsonPages::from($source) ->onRequest(fn(RequestInterface $request) => ...) ->onResponse(fn(ResponseInterface $response, RequestInterface $request) => ...)