New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can GuzzleHttp be used to listen to a specific event to obtain request body data? #3190
Comments
Middlewares can do this https://docs.guzzlephp.org/en/stable/handlers-and-middleware.html Unfortunately there's no logging example there and it's not really straightforward to understand how to do that. Here's a random google result result I found which hopefully helps you https://github.com/gmponos/guzzle-log-middleware |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you for your contributions. |
您好,您的邮件我已经收到,我会尽快回复。
|
The version I am using is 7.3.
I attempted to listen through Laravel's Illuminate\Http\Client\Events\RequestSending event, but found that it wasn't triggering.
I'm looking to collect the request body of all cURL requests in the project as part of a logging mechanism, without making modifications to code that involves the requests.
I'm hoping for assistance with this.
The text was updated successfully, but these errors were encountered: