client
client copied to clipboard
Adds RequestHandled event
This PR adds the ability register an event dispatcher.
When a request has been handled successfully and an event dispatcher is registered, a RequestHandled event will be dispatched.
The event contains the initial Payload of the request and the Response.
This feature is required to create a Recorder for Laravel Pulse in the openai/laravel repository.
Todos:
- [x] Find a better name for the
Transportablecontract - [ ] Add events docs
- [ ] Add missing factory tests
Besides the Laravel Pulse use-case, we got some people asking to instrument this library in our Sentry Laravel SDK. Is there any appetite to move forward with this PR?