I seem to be struggling to find an easy method to enable logging for all headers and the payload on a request. I see that TraceConfig allows interception of on_request_start but that does not include the payload. Maybe I've missed the documentation, but how do I see the payload sent via a POST?
Describe the solution you'd like
For the typical user who may wish to use the logging module, would it be easier to simply log headers and payload to the logger aiohttp.client, and tell a user to enable debug logging on that package if they wish to see data sent/received?
Describe alternatives you've considered
I've sifted through the source code and I can't see another alternative. I tried enabling DEBUG on the the aiohttp.client package, but no logging appeared.
Related component
Client
Additional context
No response
Code of Conduct
[X] I agree to follow the aio-libs Code of Conduct
Payload could be huge, it can lead to out-of-memory error easily. That's why the library has on_request_chunk_sent / on_response_chunk_received for tracing payload chunks. Please use this API.
Is your feature request related to a problem?
I seem to be struggling to find an easy method to enable logging for all headers and the payload on a request. I see that TraceConfig allows interception of on_request_start but that does not include the payload. Maybe I've missed the documentation, but how do I see the payload sent via a POST?
Describe the solution you'd like
For the typical user who may wish to use the logging module, would it be easier to simply log headers and payload to the logger aiohttp.client, and tell a user to enable debug logging on that package if they wish to see data sent/received?
Describe alternatives you've considered
I've sifted through the source code and I can't see another alternative. I tried enabling DEBUG on the the aiohttp.client package, but no logging appeared.
Related component
Client
Additional context
No response
Code of Conduct