I have a module for Ansible to work with API. It uses requests extensively. The problem is that I can't debug requests. Ansible module have no usable stdout/err, it's executed by ansible through aniballz system, and ansible-test is trimming away all environment vars and change paths. I need to see the exact headers and body I'm sending to the server. This server is using SSL, so tcpdump is not an option here.
Are there any solutions for low-level HTTP debugging for requests in such constrained environment?