Skip to content

Instantly share code, notes, and snippets.

@austinkelleher
Created November 21, 2014 21:09
Show Gist options
  • Save austinkelleher/0de89478233b5b88d57a to your computer and use it in GitHub Desktop.
Save austinkelleher/0de89478233b5b88d57a to your computer and use it in GitHub Desktop.
api_request.py
import urllib2
req = urllib2.Request('http://localhost:8000/account')
req.add_header("X-Auth-Token", "")
resp = urllib2.urlopen(req)
content = resp.read()
print content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment