Skip to content

Instantly share code, notes, and snippets.

@agounaris
Created December 17, 2015 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agounaris/6b8caeff88341bc0037d to your computer and use it in GitHub Desktop.
Save agounaris/6b8caeff88341bc0037d to your computer and use it in GitHub Desktop.
full info on a python requests request
import requests
import logging
import httplib
httplib.HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("requests.packages.urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True
requests.get('http://httpbin.org/headers')
r = requests.get('http://httpbin.org/get?foo=bar&baz=python')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment