Skip to content

Instantly share code, notes, and snippets.

@vadimkantorov
Last active April 22, 2025 19:55
Show Gist options
  • Save vadimkantorov/27f76014c615bc8a8a91450e9814a41c to your computer and use it in GitHub Desktop.
Save vadimkantorov/27f76014c615bc8a8a91450e9814a41c to your computer and use it in GitHub Desktop.
Python trace urllib HTTP requests
import http.client
http.client.HTTPConnection.debuglevel = 1
import urllib.request
print(urllib.request.urlopen("https://google.com").read())
PYTHONPATH=. PYTHONVERBOSE=. python test.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment