Skip to content

Instantly share code, notes, and snippets.

@anandology
Created July 3, 2012 12:41
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 anandology/3039510 to your computer and use it in GitHub Desktop.
Save anandology/3039510 to your computer and use it in GitHub Desktop.
import sys
# Uses httplib2 by default.
# Pass "--requests" command-line arg to use requests.
if "--requests" in sys.argv:
import requests
requests.get("https://auth.hasgeek.com/").content
else:
import httplib2
h = httplib2.Http()
h.request("https://auth.hasgeek.com/", "GET")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment