Skip to content

Instantly share code, notes, and snippets.

@drawcode
Created December 5, 2012 01:45
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 drawcode/4211301 to your computer and use it in GitHub Desktop.
Save drawcode/4211301 to your computer and use it in GitHub Desktop.
Python 3 Url request
import httplib2
h = httplib2.Http(".cache")
h.add_credentials('user', 'pass')
r, content = h.request("https://api.github.com", "GET")
print r['status']
print r['content-type']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment