title: How to let requests print out raw HTTP requests sent without modifying the program?
body: <pre><code>import logging
  logging.basicConfig(level=logging.DEBUG)
  </code></pre>
  <p>I currently add the following two lines to a python program using <code>requests</code> so that the raw HTTP requests can be printed. But I don't want to modify the program if possible.</p>
  <p>Is there a way to let <code>requests</code> print the raw HTTP requests without modifying the program (possibly by environment variables?), yet still print out the raw HTTP requests sent?</p>